glasspane-mcp 1.9.0 → 1.11.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.
@@ -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.9.0";
29
+ readonly version: "1.11.0";
30
30
  };
31
31
  export declare const PARSE_ERROR = -32700;
32
32
  export declare const INVALID_REQUEST = -32600;
@@ -2557,7 +2557,7 @@ function mapProjectError(error) {
2557
2557
  }
2558
2558
  function projectErrorRemedy(code) {
2559
2559
  if (code === GP_E_PROJECT_LIMIT) {
2560
- return `the limit (${MAX_PROJECTS}) counts the entries stored in the projects file named above, so a new registration cannot be made to fit by changing an existing one: gp_project_set with an existing projectId patches that entry and leaves the count where it is. See what is stored with gp_project_list, then free a slot by removing an entry from that file itself (read it first with \`python3 -m json.tool <that path>\`; this surface offers no delete, so this is a repair of the file the message names, the same route a damaged registry takes) and retry. To read the same set without this shell: glasspaned --list-projects prints the file the service loads by default`;
2560
+ return `the limit (${MAX_PROJECTS}) counts the entries stored in the projects file named above, so a new registration cannot be made to fit by changing an existing one: gp_project_set with an existing projectId patches that entry and leaves the count where it is. See what is stored with gp_project_list, then free a slot with a removal this product does implement: \`glasspaned --project-remove <projectId>\` removes exactly one registration, and \`glasspaned --project-prune\` removes only the engine's own test residue \u2014 both take \`--dry-run\` to preview and print JSON, and an unknown id exits 3. A running daemon keeps its own copy of the table, so the removal only sticks after it is restarted (the reply's requiresDaemonRestart says whether one is pending; \`launchctl kickstart -k gui/$(id -u)/com.glasspane.daemon\`). Do NOT hand-edit the projects file: the next daemon save overwrites it. To read the same set without this shell: glasspaned --list-projects prints the file the service loads by default`;
2561
2561
  }
2562
2562
  if (code === GP_E_NOT_FOUND) {
2563
2563
  return "check the projectId; use gp_project_list to view available projects";
@@ -2867,8 +2867,16 @@ function createHttpGateway(options) {
2867
2867
  client.close?.();
2868
2868
  const reaper = setInterval(() => closeIdleKeepAliveConnections(server), IDLE_REAP_MS);
2869
2869
  reaper.unref();
2870
+ const deadline = setTimeout(() => {
2871
+ report(
2872
+ `shutdown is giving up on a connection that never went idle after ${CALLER_VISIBLE_CEILING_MS}ms; any engine work it carried may still be running \u2014 do not re-issue it`
2873
+ );
2874
+ server.closeAllConnections?.();
2875
+ }, CALLER_VISIBLE_CEILING_MS);
2876
+ deadline.unref();
2870
2877
  server.close((error) => {
2871
2878
  clearInterval(reaper);
2879
+ clearTimeout(deadline);
2872
2880
  if (error) {
2873
2881
  reject(error);
2874
2882
  } else {
@@ -2881,14 +2889,7 @@ function createHttpGateway(options) {
2881
2889
  }
2882
2890
  var IDLE_REAP_MS = 200;
2883
2891
  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();
2891
- }
2892
+ server.closeIdleConnections?.();
2892
2893
  }
2893
2894
  function isLoopbackHost(value) {
2894
2895
  const trimmed = value.trim().toLowerCase();
@@ -2547,7 +2547,7 @@ function mapProjectError(error) {
2547
2547
  }
2548
2548
  function projectErrorRemedy(code) {
2549
2549
  if (code === GP_E_PROJECT_LIMIT) {
2550
- return `the limit (${MAX_PROJECTS}) counts the entries stored in the projects file named above, so a new registration cannot be made to fit by changing an existing one: gp_project_set with an existing projectId patches that entry and leaves the count where it is. See what is stored with gp_project_list, then free a slot by removing an entry from that file itself (read it first with \`python3 -m json.tool <that path>\`; this surface offers no delete, so this is a repair of the file the message names, the same route a damaged registry takes) and retry. To read the same set without this shell: glasspaned --list-projects prints the file the service loads by default`;
2550
+ return `the limit (${MAX_PROJECTS}) counts the entries stored in the projects file named above, so a new registration cannot be made to fit by changing an existing one: gp_project_set with an existing projectId patches that entry and leaves the count where it is. See what is stored with gp_project_list, then free a slot with a removal this product does implement: \`glasspaned --project-remove <projectId>\` removes exactly one registration, and \`glasspaned --project-prune\` removes only the engine's own test residue \u2014 both take \`--dry-run\` to preview and print JSON, and an unknown id exits 3. A running daemon keeps its own copy of the table, so the removal only sticks after it is restarted (the reply's requiresDaemonRestart says whether one is pending; \`launchctl kickstart -k gui/$(id -u)/com.glasspane.daemon\`). Do NOT hand-edit the projects file: the next daemon save overwrites it. To read the same set without this shell: glasspaned --list-projects prints the file the service loads by default`;
2551
2551
  }
2552
2552
  if (code === GP_E_NOT_FOUND) {
2553
2553
  return "check the projectId; use gp_project_list to view available projects";
@@ -2857,8 +2857,16 @@ function createHttpGateway(options) {
2857
2857
  client.close?.();
2858
2858
  const reaper = setInterval(() => closeIdleKeepAliveConnections(server), IDLE_REAP_MS);
2859
2859
  reaper.unref();
2860
+ const deadline = setTimeout(() => {
2861
+ report(
2862
+ `shutdown is giving up on a connection that never went idle after ${CALLER_VISIBLE_CEILING_MS}ms; any engine work it carried may still be running \u2014 do not re-issue it`
2863
+ );
2864
+ server.closeAllConnections?.();
2865
+ }, CALLER_VISIBLE_CEILING_MS);
2866
+ deadline.unref();
2860
2867
  server.close((error) => {
2861
2868
  clearInterval(reaper);
2869
+ clearTimeout(deadline);
2862
2870
  if (error) {
2863
2871
  reject(error);
2864
2872
  } else {
@@ -2871,14 +2879,7 @@ function createHttpGateway(options) {
2871
2879
  }
2872
2880
  var IDLE_REAP_MS = 200;
2873
2881
  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();
2881
- }
2882
+ server.closeIdleConnections?.();
2882
2883
  }
2883
2884
  function isLoopbackHost(value) {
2884
2885
  const trimmed = value.trim().toLowerCase();
package/dist/index.js CHANGED
@@ -3384,7 +3384,7 @@ function mapProjectError(error) {
3384
3384
  }
3385
3385
  function projectErrorRemedy(code) {
3386
3386
  if (code === GP_E_PROJECT_LIMIT) {
3387
- return `the limit (${MAX_PROJECTS}) counts the entries stored in the projects file named above, so a new registration cannot be made to fit by changing an existing one: gp_project_set with an existing projectId patches that entry and leaves the count where it is. See what is stored with gp_project_list, then free a slot by removing an entry from that file itself (read it first with \`python3 -m json.tool <that path>\`; this surface offers no delete, so this is a repair of the file the message names, the same route a damaged registry takes) and retry. To read the same set without this shell: glasspaned --list-projects prints the file the service loads by default`;
3387
+ return `the limit (${MAX_PROJECTS}) counts the entries stored in the projects file named above, so a new registration cannot be made to fit by changing an existing one: gp_project_set with an existing projectId patches that entry and leaves the count where it is. See what is stored with gp_project_list, then free a slot with a removal this product does implement: \`glasspaned --project-remove <projectId>\` removes exactly one registration, and \`glasspaned --project-prune\` removes only the engine's own test residue \u2014 both take \`--dry-run\` to preview and print JSON, and an unknown id exits 3. A running daemon keeps its own copy of the table, so the removal only sticks after it is restarted (the reply's requiresDaemonRestart says whether one is pending; \`launchctl kickstart -k gui/$(id -u)/com.glasspane.daemon\`). Do NOT hand-edit the projects file: the next daemon save overwrites it. To read the same set without this shell: glasspaned --list-projects prints the file the service loads by default`;
3388
3388
  }
3389
3389
  if (code === GP_E_NOT_FOUND) {
3390
3390
  return "check the projectId; use gp_project_list to view available projects";
@@ -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.9.0" };
3668
+ var SERVER_INFO = { name: "glasspane-mcp", version: "1.11.0" };
3669
3669
  var PARSE_ERROR = -32700;
3670
3670
  var INVALID_REQUEST = -32600;
3671
3671
  var METHOD_NOT_FOUND = -32601;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "glasspane-mcp",
3
- "version": "1.9.0",
3
+ "version": "1.11.0",
4
4
  "description": "GlassPane MCP stdio shell: JSON-RPC 2.0 over stdio bridging an AI agent to the glasspane engine daemon",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",