glasspane-mcp 1.8.2 → 1.9.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/dispatch.d.ts +1 -1
- package/dist/http-gateway-cli.js +21 -6
- package/dist/http-gateway.js +15 -6
- package/dist/index.js +2 -2
- package/package.json +1 -1
package/dist/dispatch.d.ts
CHANGED
|
@@ -26,7 +26,7 @@ export declare const MCP_PROTOCOL_VERSION: "2025-06-18";
|
|
|
26
26
|
export declare const SUPPORTED_PROTOCOL_VERSIONS: readonly string[];
|
|
27
27
|
export declare const SERVER_INFO: {
|
|
28
28
|
readonly name: "glasspane-mcp";
|
|
29
|
-
readonly version: "1.
|
|
29
|
+
readonly version: "1.9.0";
|
|
30
30
|
};
|
|
31
31
|
export declare const PARSE_ERROR = -32700;
|
|
32
32
|
export declare const INVALID_REQUEST = -32600;
|
package/dist/http-gateway-cli.js
CHANGED
|
@@ -2865,21 +2865,29 @@ function createHttpGateway(options) {
|
|
|
2865
2865
|
server.listen(port, host);
|
|
2866
2866
|
const close = () => new Promise((resolve, reject) => {
|
|
2867
2867
|
client.close?.();
|
|
2868
|
+
const reaper = setInterval(() => closeIdleKeepAliveConnections(server), IDLE_REAP_MS);
|
|
2869
|
+
reaper.unref();
|
|
2868
2870
|
server.close((error) => {
|
|
2871
|
+
clearInterval(reaper);
|
|
2869
2872
|
if (error) {
|
|
2870
2873
|
reject(error);
|
|
2871
2874
|
} else {
|
|
2872
2875
|
resolve();
|
|
2873
2876
|
}
|
|
2874
2877
|
});
|
|
2875
|
-
|
|
2878
|
+
closeIdleKeepAliveConnections(server);
|
|
2876
2879
|
});
|
|
2877
2880
|
return { server, close };
|
|
2878
2881
|
}
|
|
2879
|
-
|
|
2880
|
-
|
|
2881
|
-
|
|
2882
|
-
|
|
2882
|
+
var IDLE_REAP_MS = 200;
|
|
2883
|
+
function closeIdleKeepAliveConnections(server) {
|
|
2884
|
+
const handles = server;
|
|
2885
|
+
if (typeof handles.closeIdleConnections === "function") {
|
|
2886
|
+
handles.closeIdleConnections();
|
|
2887
|
+
return;
|
|
2888
|
+
}
|
|
2889
|
+
if (typeof handles.closeAllConnections === "function") {
|
|
2890
|
+
handles.closeAllConnections();
|
|
2883
2891
|
}
|
|
2884
2892
|
}
|
|
2885
2893
|
function isLoopbackHost(value) {
|
|
@@ -3466,7 +3474,8 @@ function readBody(req, limit) {
|
|
|
3466
3474
|
req.on("data", (chunk) => {
|
|
3467
3475
|
size += chunk.length;
|
|
3468
3476
|
if (size > limit) {
|
|
3469
|
-
|
|
3477
|
+
chunks.length = 0;
|
|
3478
|
+
req.pause();
|
|
3470
3479
|
reject(new HTTPPayloadTooLargeError(limit));
|
|
3471
3480
|
return;
|
|
3472
3481
|
}
|
|
@@ -3511,6 +3520,12 @@ function parseArgs(argv) {
|
|
|
3511
3520
|
i += 1;
|
|
3512
3521
|
} else if (arg.startsWith("--port=")) {
|
|
3513
3522
|
options.port = parsePort(arg.slice("--port=".length), "--port");
|
|
3523
|
+
} else {
|
|
3524
|
+
throw new Error(
|
|
3525
|
+
`unknown argument: ${arg}
|
|
3526
|
+
${USAGE}
|
|
3527
|
+
This entrypoint accepts only --help/-h, --socket-path/-s <path> and --port/-p <n>. A flag spelled wrong here is not an error the daemon will ever report.`
|
|
3528
|
+
);
|
|
3514
3529
|
}
|
|
3515
3530
|
}
|
|
3516
3531
|
return options;
|
package/dist/http-gateway.js
CHANGED
|
@@ -2855,21 +2855,29 @@ function createHttpGateway(options) {
|
|
|
2855
2855
|
server.listen(port, host);
|
|
2856
2856
|
const close = () => new Promise((resolve, reject) => {
|
|
2857
2857
|
client.close?.();
|
|
2858
|
+
const reaper = setInterval(() => closeIdleKeepAliveConnections(server), IDLE_REAP_MS);
|
|
2859
|
+
reaper.unref();
|
|
2858
2860
|
server.close((error) => {
|
|
2861
|
+
clearInterval(reaper);
|
|
2859
2862
|
if (error) {
|
|
2860
2863
|
reject(error);
|
|
2861
2864
|
} else {
|
|
2862
2865
|
resolve();
|
|
2863
2866
|
}
|
|
2864
2867
|
});
|
|
2865
|
-
|
|
2868
|
+
closeIdleKeepAliveConnections(server);
|
|
2866
2869
|
});
|
|
2867
2870
|
return { server, close };
|
|
2868
2871
|
}
|
|
2869
|
-
|
|
2870
|
-
|
|
2871
|
-
|
|
2872
|
-
|
|
2872
|
+
var IDLE_REAP_MS = 200;
|
|
2873
|
+
function closeIdleKeepAliveConnections(server) {
|
|
2874
|
+
const handles = server;
|
|
2875
|
+
if (typeof handles.closeIdleConnections === "function") {
|
|
2876
|
+
handles.closeIdleConnections();
|
|
2877
|
+
return;
|
|
2878
|
+
}
|
|
2879
|
+
if (typeof handles.closeAllConnections === "function") {
|
|
2880
|
+
handles.closeAllConnections();
|
|
2873
2881
|
}
|
|
2874
2882
|
}
|
|
2875
2883
|
function isLoopbackHost(value) {
|
|
@@ -3456,7 +3464,8 @@ function readBody(req, limit) {
|
|
|
3456
3464
|
req.on("data", (chunk) => {
|
|
3457
3465
|
size += chunk.length;
|
|
3458
3466
|
if (size > limit) {
|
|
3459
|
-
|
|
3467
|
+
chunks.length = 0;
|
|
3468
|
+
req.pause();
|
|
3460
3469
|
reject(new HTTPPayloadTooLargeError(limit));
|
|
3461
3470
|
return;
|
|
3462
3471
|
}
|
package/dist/index.js
CHANGED
|
@@ -3665,7 +3665,7 @@ var SUPPORTED_PROTOCOL_VERSIONS = [
|
|
|
3665
3665
|
"2025-03-26",
|
|
3666
3666
|
MCP_PROTOCOL_VERSION
|
|
3667
3667
|
];
|
|
3668
|
-
var SERVER_INFO = { name: "glasspane-mcp", version: "1.
|
|
3668
|
+
var SERVER_INFO = { name: "glasspane-mcp", version: "1.9.0" };
|
|
3669
3669
|
var PARSE_ERROR = -32700;
|
|
3670
3670
|
var INVALID_REQUEST = -32600;
|
|
3671
3671
|
var METHOD_NOT_FOUND = -32601;
|
|
@@ -3784,7 +3784,7 @@ var McpServer = class {
|
|
|
3784
3784
|
if (!spec) {
|
|
3785
3785
|
return this.error(INVALID_PARAMS, `Unknown tool: ${name}`, id);
|
|
3786
3786
|
}
|
|
3787
|
-
const outcome = await executeTool(spec, params.arguments, this.deps.engine, this.session);
|
|
3787
|
+
const outcome = await executeTool(spec, params.arguments ?? {}, this.deps.engine, this.session);
|
|
3788
3788
|
return this.result(id, { content: outcome.content, isError: outcome.isError });
|
|
3789
3789
|
}
|
|
3790
3790
|
asParams(rawParams) {
|
package/package.json
CHANGED