sticky-note-cli 3.1.24 → 3.1.26
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 +52 -9
- package/package.json +1 -1
- package/sticky-server/.wrangler/state/v3/observability/miniflare-wobs-trace-store/a590acd76969f996ec6e4b599c3c09f58c283a76f2d61392b5d3046caf557602.sqlite-shm +0 -0
- package/sticky-server/.wrangler/state/v3/observability/miniflare-wobs-trace-store/a590acd76969f996ec6e4b599c3c09f58c283a76f2d61392b5d3046caf557602.sqlite-wal +0 -0
- package/templates/sticky-note-mcp.js +3 -0
package/bin/cli.js
CHANGED
|
@@ -1394,20 +1394,23 @@ function cmdUpdate() {
|
|
|
1394
1394
|
print(" [OK] .claude/sticky-note-mcp.js (MCP entry point updated)");
|
|
1395
1395
|
}
|
|
1396
1396
|
|
|
1397
|
-
//
|
|
1397
|
+
// Ensure .mcp.json has a correct sticky-note entry using "node .claude/sticky-note-mcp.js".
|
|
1398
1398
|
// The old npx approach goes through multiple .cmd shim layers on Windows, causing
|
|
1399
1399
|
// Claude Code to silently skip the server. The node approach is a direct single process.
|
|
1400
1400
|
const correctMcpEntry = { type: "stdio", command: "node", args: [".claude/sticky-note-mcp.js"] };
|
|
1401
1401
|
try {
|
|
1402
1402
|
const mcpJsonPath = path.join(process.cwd(), ".mcp.json");
|
|
1403
|
-
|
|
1404
|
-
|
|
1405
|
-
|
|
1406
|
-
|
|
1407
|
-
|
|
1408
|
-
|
|
1409
|
-
|
|
1410
|
-
|
|
1403
|
+
const mcpJson = fs.existsSync(mcpJsonPath) ? readJsonSafe(mcpJsonPath, {}) : {};
|
|
1404
|
+
if (!mcpJson.mcpServers) mcpJson.mcpServers = {};
|
|
1405
|
+
const projectEntry = mcpJson.mcpServers["sticky-note"];
|
|
1406
|
+
if (!projectEntry) {
|
|
1407
|
+
mcpJson.mcpServers["sticky-note"] = correctMcpEntry;
|
|
1408
|
+
fs.writeFileSync(mcpJsonPath, JSON.stringify(mcpJson, null, 2) + "\n");
|
|
1409
|
+
print(" [OK] .mcp.json: added sticky-note MCP entry");
|
|
1410
|
+
} else if (projectEntry.command !== "node" || JSON.stringify(projectEntry.args) !== JSON.stringify(correctMcpEntry.args)) {
|
|
1411
|
+
mcpJson.mcpServers["sticky-note"] = correctMcpEntry;
|
|
1412
|
+
fs.writeFileSync(mcpJsonPath, JSON.stringify(mcpJson, null, 2) + "\n");
|
|
1413
|
+
print(" [OK] .mcp.json: migrated sticky-note to direct node invocation (Windows MCP fix)");
|
|
1411
1414
|
}
|
|
1412
1415
|
} catch (_) { /* non-fatal */ }
|
|
1413
1416
|
|
|
@@ -1423,6 +1426,46 @@ function cmdUpdate() {
|
|
|
1423
1426
|
}
|
|
1424
1427
|
} catch (_) { /* non-fatal */ }
|
|
1425
1428
|
|
|
1429
|
+
// Create environment directory if missing (idempotent — skips if manifest already exists)
|
|
1430
|
+
const envDir = path.join(stickyDir, "environment");
|
|
1431
|
+
const envManifestDest = path.join(envDir, "manifest.json");
|
|
1432
|
+
mkdirSafe(path.join(envDir, "skills"));
|
|
1433
|
+
mkdirSafe(path.join(envDir, "agents"));
|
|
1434
|
+
mkdirSafe(path.join(envDir, "commands"));
|
|
1435
|
+
if (!fs.existsSync(envManifestDest)) {
|
|
1436
|
+
const detectedServers = Array.from(detectMcpServers().values());
|
|
1437
|
+
const manifestData = { version: "1", mcp_servers: {}, permissions: [], env_vars: {} };
|
|
1438
|
+
for (const server of detectedServers) {
|
|
1439
|
+
const entry = { type: server.type || "stdio", description: server.name, required: false };
|
|
1440
|
+
if (server.command) entry.command = server.command;
|
|
1441
|
+
if (server.args) entry.args = server.args;
|
|
1442
|
+
if (server.env) {
|
|
1443
|
+
entry.env = {};
|
|
1444
|
+
for (const [k] of Object.entries(server.env)) {
|
|
1445
|
+
entry.env[k] = `\${${k}}`;
|
|
1446
|
+
manifestData.env_vars[k] = { description: k, required: true };
|
|
1447
|
+
}
|
|
1448
|
+
}
|
|
1449
|
+
manifestData.mcp_servers[server.name] = entry;
|
|
1450
|
+
}
|
|
1451
|
+
const detectedSkills = Array.from(detectSkills());
|
|
1452
|
+
for (const skillName of detectedSkills) {
|
|
1453
|
+
const claudeSkillPath = path.join(process.cwd(), ".claude", "plugins");
|
|
1454
|
+
const possibleSkillPaths = [
|
|
1455
|
+
path.join(claudeSkillPath, skillName, "SKILL.md"),
|
|
1456
|
+
path.join(claudeSkillPath, skillName, "skills", skillName, "SKILL.md"),
|
|
1457
|
+
];
|
|
1458
|
+
for (const sp of possibleSkillPaths) {
|
|
1459
|
+
if (fs.existsSync(sp)) {
|
|
1460
|
+
fs.copyFileSync(sp, path.join(envDir, "skills", skillName + ".md"));
|
|
1461
|
+
break;
|
|
1462
|
+
}
|
|
1463
|
+
}
|
|
1464
|
+
}
|
|
1465
|
+
fs.writeFileSync(envManifestDest, JSON.stringify(manifestData, null, 2) + "\n");
|
|
1466
|
+
print(` [OK] Created .sticky-note/environment/ (${detectedServers.length} MCP server(s) detected)`);
|
|
1467
|
+
}
|
|
1468
|
+
|
|
1426
1469
|
print(`\n ✨ Scripts updated to v${VERSION}`);
|
|
1427
1470
|
|
|
1428
1471
|
// Update instruction files (section-based: only replaces between markers)
|
package/package.json
CHANGED
|
Binary file
|
|
Binary file
|
|
@@ -2,4 +2,7 @@
|
|
|
2
2
|
// sticky-note MCP server entry point
|
|
3
3
|
// Auto-generated by sticky-note-cli init/update. Do not edit manually.
|
|
4
4
|
// Runs the sticky-note MCP server in-process using the installed package.
|
|
5
|
+
// Injects --project so the server always reads from this project's root,
|
|
6
|
+
// regardless of the CWD Claude Code uses when spawning the MCP process.
|
|
7
|
+
process.argv.push("--project", require("path").resolve(__dirname, ".."));
|
|
5
8
|
require("sticky-note-cli/bin/mcp-server.js");
|