@bryan-thompson/inspector-assessment-server 1.3.0 → 1.5.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/build/index.js +17 -3
- package/package.json +2 -2
package/build/index.js
CHANGED
|
@@ -188,18 +188,31 @@ const authMiddleware = (req, res, next) => {
|
|
|
188
188
|
* This is necessary for the EventSource polyfill which expects web streams
|
|
189
189
|
*/
|
|
190
190
|
const createWebReadableStream = (nodeStream) => {
|
|
191
|
+
let closed = false;
|
|
191
192
|
return new ReadableStream({
|
|
192
193
|
start(controller) {
|
|
193
194
|
nodeStream.on("data", (chunk) => {
|
|
194
|
-
|
|
195
|
+
if (!closed) {
|
|
196
|
+
controller.enqueue(chunk);
|
|
197
|
+
}
|
|
195
198
|
});
|
|
196
199
|
nodeStream.on("end", () => {
|
|
197
|
-
|
|
200
|
+
if (!closed) {
|
|
201
|
+
closed = true;
|
|
202
|
+
controller.close();
|
|
203
|
+
}
|
|
198
204
|
});
|
|
199
205
|
nodeStream.on("error", (err) => {
|
|
200
|
-
|
|
206
|
+
if (!closed) {
|
|
207
|
+
closed = true;
|
|
208
|
+
controller.error(err);
|
|
209
|
+
}
|
|
201
210
|
});
|
|
202
211
|
},
|
|
212
|
+
cancel() {
|
|
213
|
+
closed = true;
|
|
214
|
+
nodeStream.destroy();
|
|
215
|
+
},
|
|
203
216
|
});
|
|
204
217
|
};
|
|
205
218
|
/**
|
|
@@ -397,6 +410,7 @@ app.delete("/mcp", originValidationMiddleware, authMiddleware, async (req, res)
|
|
|
397
410
|
}
|
|
398
411
|
else {
|
|
399
412
|
await serverTransport.terminateSession();
|
|
413
|
+
await serverTransport.close();
|
|
400
414
|
webAppTransports.delete(sessionId);
|
|
401
415
|
serverTransports.delete(sessionId);
|
|
402
416
|
sessionHeaderHolders.delete(sessionId);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@bryan-thompson/inspector-assessment-server",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.5.0",
|
|
4
4
|
"description": "Server-side application for the Enhanced MCP Inspector with assessment capabilities",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"author": "Bryan Thompson <bryan@triepod.ai>",
|
|
@@ -38,7 +38,7 @@
|
|
|
38
38
|
"typescript": "^5.6.2"
|
|
39
39
|
},
|
|
40
40
|
"dependencies": {
|
|
41
|
-
"@modelcontextprotocol/sdk": "^1.
|
|
41
|
+
"@modelcontextprotocol/sdk": "^1.23.0",
|
|
42
42
|
"cors": "^2.8.5",
|
|
43
43
|
"express": "^5.1.0",
|
|
44
44
|
"shell-quote": "^1.8.3",
|