@wipcomputer/wip-ldm-os 0.4.6 → 0.4.7
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/SKILL.md +1 -1
- package/bin/ldm.js +23 -0
- package/lib/deploy.mjs +3 -1
- package/package.json +1 -1
package/SKILL.md
CHANGED
package/bin/ldm.js
CHANGED
|
@@ -887,6 +887,29 @@ async function cmdDoctor() {
|
|
|
887
887
|
}
|
|
888
888
|
}
|
|
889
889
|
|
|
890
|
+
// --fix: clean stale MCP entries from ~/.claude.json (tmp paths, ldm-install- names)
|
|
891
|
+
if (FIX_FLAG) {
|
|
892
|
+
const ccUserPath = join(HOME, '.claude.json');
|
|
893
|
+
const ccUser = readJSON(ccUserPath);
|
|
894
|
+
if (ccUser?.mcpServers) {
|
|
895
|
+
const staleMcp = [];
|
|
896
|
+
for (const [name, cfg] of Object.entries(ccUser.mcpServers)) {
|
|
897
|
+
const args = cfg.args || [];
|
|
898
|
+
const isTmpPath = args.some(a => a.startsWith('/tmp/') || a.startsWith('/private/tmp/'));
|
|
899
|
+
const isTmpName = name.startsWith('ldm-install-') || name.startsWith('wip-install-');
|
|
900
|
+
if (isTmpPath || isTmpName) staleMcp.push(name);
|
|
901
|
+
}
|
|
902
|
+
for (const name of staleMcp) {
|
|
903
|
+
delete ccUser.mcpServers[name];
|
|
904
|
+
console.log(` + Removed stale MCP: ${name}`);
|
|
905
|
+
issues = Math.max(0, issues - 1);
|
|
906
|
+
}
|
|
907
|
+
if (staleMcp.length > 0) {
|
|
908
|
+
writeFileSync(ccUserPath, JSON.stringify(ccUser, null, 2) + '\n');
|
|
909
|
+
}
|
|
910
|
+
}
|
|
911
|
+
}
|
|
912
|
+
|
|
890
913
|
// 4. Check sacred locations
|
|
891
914
|
const sacred = [
|
|
892
915
|
{ path: join(LDM_ROOT, 'memory'), label: 'memory/' },
|
package/lib/deploy.mjs
CHANGED
|
@@ -481,7 +481,9 @@ function verifyOcConfig(pluginDirName) {
|
|
|
481
481
|
}
|
|
482
482
|
|
|
483
483
|
function registerMCP(repoPath, door, toolName) {
|
|
484
|
-
|
|
484
|
+
let rawName = toolName || door.name || basename(repoPath);
|
|
485
|
+
// Strip /tmp/ clone prefixes (ldm-install-, wip-install-)
|
|
486
|
+
rawName = rawName.replace(/^(ldm-install-|wip-install-)/, '');
|
|
485
487
|
const name = rawName.replace(/^@[\w-]+\//, '');
|
|
486
488
|
const ldmServerPath = join(LDM_EXTENSIONS, name, door.file);
|
|
487
489
|
const ldmFallbackPath = join(LDM_EXTENSIONS, basename(repoPath), door.file);
|