sticky-note-cli 3.1.20 → 3.1.22

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/bin/cli.js CHANGED
@@ -1365,17 +1365,32 @@ function cmdUpdate() {
1365
1365
  }
1366
1366
 
1367
1367
  // Fix stale MCP entry in ~/.claude/settings.json (old -p flag broke Windows)
1368
+ const correctMcpArgs = ["-y", "sticky-note-cli", "mcp-server"];
1368
1369
  try {
1369
1370
  const globalSettingsPath = path.join(os.homedir(), ".claude", "settings.json");
1370
1371
  const globalSettings = readJsonSafe(globalSettingsPath, {});
1371
1372
  const mcpEntry = globalSettings.mcpServers && globalSettings.mcpServers["sticky-note"];
1372
1373
  if (mcpEntry && JSON.stringify(mcpEntry.args).includes("-p")) {
1373
- globalSettings.mcpServers["sticky-note"].args = ["-y", "sticky-note-cli", "mcp-server"];
1374
+ globalSettings.mcpServers["sticky-note"].args = correctMcpArgs;
1374
1375
  fs.writeFileSync(globalSettingsPath, JSON.stringify(globalSettings, null, 2) + "\n");
1375
1376
  print(" [OK] ~/.claude/settings.json: fixed sticky-note MCP args (Windows compat)");
1376
1377
  }
1377
1378
  } catch (_) { /* non-fatal */ }
1378
1379
 
1380
+ // Fix stale MCP entry in project .mcp.json (same -p flag issue)
1381
+ try {
1382
+ const mcpJsonPath = path.join(process.cwd(), ".mcp.json");
1383
+ if (fs.existsSync(mcpJsonPath)) {
1384
+ const mcpJson = readJsonSafe(mcpJsonPath, {});
1385
+ const projectEntry = mcpJson.mcpServers && mcpJson.mcpServers["sticky-note"];
1386
+ if (projectEntry && JSON.stringify(projectEntry.args).includes("-p")) {
1387
+ mcpJson.mcpServers["sticky-note"].args = correctMcpArgs;
1388
+ fs.writeFileSync(mcpJsonPath, JSON.stringify(mcpJson, null, 2) + "\n");
1389
+ print(" [OK] .mcp.json: fixed sticky-note MCP args (Windows compat)");
1390
+ }
1391
+ }
1392
+ } catch (_) { /* non-fatal */ }
1393
+
1379
1394
  print(`\n ✨ Scripts updated to v${VERSION}`);
1380
1395
 
1381
1396
  // Update instruction files (section-based: only replaces between markers)
@@ -3782,16 +3797,10 @@ function cmdMcpServer() {
3782
3797
  print(" [ERR] mcp-server.js not found");
3783
3798
  process.exit(1);
3784
3799
  }
3785
- // Forward to the MCP server script, passing remaining args + --project
3786
- const args = ["--project", process.cwd(), ...process.argv.slice(3)];
3787
- const { execFileSync } = require("child_process");
3788
- try {
3789
- execFileSync(process.execPath, [mcpServerPath, ...args], {
3790
- stdio: "inherit",
3791
- });
3792
- } catch (err) {
3793
- if (err.status) process.exit(err.status);
3794
- }
3800
+ // Run mcp-server.js in-process to avoid stdio pipe inheritance issues on Windows.
3801
+ // Inject --project <cwd> so the server knows which project to serve.
3802
+ process.argv = [process.argv[0], mcpServerPath, "--project", process.cwd(), ...process.argv.slice(3)];
3803
+ require(mcpServerPath);
3795
3804
  }
3796
3805
 
3797
3806
  // ──────────────────────────────────────────────
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "sticky-note-cli",
3
- "version": "3.1.20",
3
+ "version": "3.1.22",
4
4
  "description": "Human-to-human handoff for AI coding assistants. Git-backed shared memory for Claude Code and Copilot CLI.",
5
5
  "license": "MIT",
6
6
  "bin": {