@wipcomputer/wip-ldm-os 0.4.5 → 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 +8 -8
- package/bin/ldm.js +63 -5
- package/lib/deploy.mjs +3 -1
- package/package.json +1 -1
package/SKILL.md
CHANGED
|
@@ -5,7 +5,7 @@ license: MIT
|
|
|
5
5
|
interface: [cli, skill]
|
|
6
6
|
metadata:
|
|
7
7
|
display-name: "LDM OS"
|
|
8
|
-
version: "0.4.
|
|
8
|
+
version: "0.4.7"
|
|
9
9
|
homepage: "https://github.com/wipcomputer/wip-ldm-os"
|
|
10
10
|
author: "Parker Todd Brooks"
|
|
11
11
|
category: infrastructure
|
|
@@ -149,18 +149,18 @@ No manual configuration needed. Point it at a repo and it figures out the rest.
|
|
|
149
149
|
|
|
150
150
|
## Update
|
|
151
151
|
|
|
152
|
-
If LDM OS is already installed,
|
|
152
|
+
If LDM OS is already installed, run `ldm status` BEFORE presenting the summary to the user:
|
|
153
153
|
|
|
154
154
|
```bash
|
|
155
|
-
ldm
|
|
156
|
-
ldm install --dry-run 2>&1 # shows extension update count
|
|
155
|
+
ldm status 2>&1
|
|
157
156
|
```
|
|
158
157
|
|
|
159
|
-
|
|
160
|
-
-
|
|
161
|
-
-
|
|
158
|
+
`ldm status` checks both the CLI and all extensions against npm. It shows:
|
|
159
|
+
- CLI version and whether a newer version exists
|
|
160
|
+
- Extension count and how many have updates available
|
|
161
|
+
- Specific version diffs for each outdated extension
|
|
162
162
|
|
|
163
|
-
**Do not say "up to date" if
|
|
163
|
+
**Use the output of `ldm status` as your summary.** Do not say "up to date" if `ldm status` shows updates available. Do not make your own summary without running `ldm status` first.
|
|
164
164
|
|
|
165
165
|
When the user wants to update:
|
|
166
166
|
```bash
|
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/' },
|
|
@@ -983,18 +1006,53 @@ function cmdStatus() {
|
|
|
983
1006
|
return;
|
|
984
1007
|
}
|
|
985
1008
|
|
|
1009
|
+
// Check CLI version against npm
|
|
1010
|
+
let cliUpdate = null;
|
|
1011
|
+
try {
|
|
1012
|
+
const latest = execSync('npm view @wipcomputer/wip-ldm-os version 2>/dev/null', {
|
|
1013
|
+
encoding: 'utf8', timeout: 10000,
|
|
1014
|
+
}).trim();
|
|
1015
|
+
if (latest && latest !== PKG_VERSION) cliUpdate = latest;
|
|
1016
|
+
} catch {}
|
|
1017
|
+
|
|
1018
|
+
// Check extensions against npm
|
|
1019
|
+
const updates = [];
|
|
1020
|
+
for (const [name, info] of Object.entries(registry?.extensions || {})) {
|
|
1021
|
+
const extPkgPath = join(LDM_EXTENSIONS, name, 'package.json');
|
|
1022
|
+
const extPkg = readJSON(extPkgPath);
|
|
1023
|
+
const npmPkg = extPkg?.name;
|
|
1024
|
+
if (!npmPkg || !npmPkg.startsWith('@')) continue;
|
|
1025
|
+
const currentVersion = extPkg.version || info.version;
|
|
1026
|
+
if (!currentVersion) continue;
|
|
1027
|
+
try {
|
|
1028
|
+
const latest = execSync(`npm view ${npmPkg} version 2>/dev/null`, {
|
|
1029
|
+
encoding: 'utf8', timeout: 10000,
|
|
1030
|
+
}).trim();
|
|
1031
|
+
if (latest && latest !== currentVersion) {
|
|
1032
|
+
updates.push({ name, current: currentVersion, latest, npm: npmPkg });
|
|
1033
|
+
}
|
|
1034
|
+
} catch {}
|
|
1035
|
+
}
|
|
1036
|
+
|
|
986
1037
|
console.log('');
|
|
987
|
-
console.log(` LDM OS v${version.version}`);
|
|
1038
|
+
console.log(` LDM OS v${version.version}${cliUpdate ? ` (v${cliUpdate} available)` : ' (latest)'}`);
|
|
988
1039
|
console.log(` Installed: ${version.installed?.split('T')[0]}`);
|
|
989
1040
|
console.log(` Updated: ${version.updated?.split('T')[0]}`);
|
|
990
|
-
console.log(` Extensions: ${extCount}`);
|
|
1041
|
+
console.log(` Extensions: ${extCount}${updates.length > 0 ? `, ${updates.length} update(s) available` : ', all up to date'}`);
|
|
991
1042
|
console.log(` Root: ${LDM_ROOT}`);
|
|
992
1043
|
|
|
993
|
-
if (
|
|
1044
|
+
if (updates.length > 0) {
|
|
994
1045
|
console.log('');
|
|
995
|
-
|
|
996
|
-
|
|
1046
|
+
console.log(' Updates available:');
|
|
1047
|
+
for (const u of updates) {
|
|
1048
|
+
console.log(` ${u.name}: v${u.current} -> v${u.latest} (${u.npm})`);
|
|
997
1049
|
}
|
|
1050
|
+
console.log('');
|
|
1051
|
+
console.log(' Run: ldm install');
|
|
1052
|
+
}
|
|
1053
|
+
|
|
1054
|
+
if (cliUpdate) {
|
|
1055
|
+
console.log(` CLI update: npm install -g @wipcomputer/wip-ldm-os@${cliUpdate}`);
|
|
998
1056
|
}
|
|
999
1057
|
|
|
1000
1058
|
console.log('');
|
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);
|