@twojestarerpg/campaignmap-mcp 0.1.0 → 0.1.1

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 CHANGED
@@ -39,11 +39,14 @@ async function main() {
39
39
  log(`serving ${config.apiUrl} (${session.isLoggedIn() ? 'session found' : 'not logged in yet'})`);
40
40
  serveStdio(() => createMcpServer({ api, confirm }), { onerror: (e) => log(`protocol error: ${e.message}`) });
41
41
  }
42
+ // No process.exit(): on Windows it can fire while the terminal handle is still
43
+ // closing and crash libuv ("Assertion failed: !(handle->flags & UV_HANDLE_CLOSING)").
44
+ // login / logout end by themselves once stdin is paused; the server stays alive on stdin.
42
45
  main().then(() => {
43
- // `login` / `logout` finished; the server variant keeps the process alive via stdin.
44
46
  if (process.argv[2] === 'login' || process.argv[2] === 'logout')
45
- process.exit(0);
47
+ process.stdin.pause();
46
48
  }, (err) => {
47
49
  log(`fatal: ${err.message}`);
48
- process.exit(1);
50
+ process.exitCode = 1;
51
+ process.stdin.pause();
49
52
  });
package/dist/server.js CHANGED
@@ -3,7 +3,7 @@
3
3
  import { McpServer } from '@modelcontextprotocol/server';
4
4
  import { tools as allTools } from './tools/index.js';
5
5
  import { runTool } from './tools/run.js';
6
- export const SERVER_INFO = { name: 'campaignmap', version: '0.1.0' };
6
+ export const SERVER_INFO = { name: 'campaignmap', version: '0.1.1' };
7
7
  export function createMcpServer({ api, confirm, tools = allTools }) {
8
8
  const server = new McpServer(SERVER_INFO);
9
9
  for (const tool of tools) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@twojestarerpg/campaignmap-mcp",
3
- "version": "0.1.0",
3
+ "version": "0.1.1",
4
4
  "description": "MCP server that lets an AI assistant read and edit your CampaignMap campaigns and maps",
5
5
  "type": "module",
6
6
  "bin": {