@wipcomputer/wip-ldm-os 0.4.6 → 0.4.8
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 +13 -2
- package/bin/ldm.js +39 -4
- 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.8"
|
|
9
9
|
homepage: "https://github.com/wipcomputer/wip-ldm-os"
|
|
10
10
|
author: "Parker Todd Brooks"
|
|
11
11
|
category: infrastructure
|
|
@@ -162,7 +162,18 @@ ldm status 2>&1
|
|
|
162
162
|
|
|
163
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
|
-
When the user wants to update
|
|
165
|
+
When the user asks for a dry run or wants to update, run `ldm install --dry-run` and display the results as a **table**:
|
|
166
|
+
|
|
167
|
+
```
|
|
168
|
+
| Extension | Current | Available | Package |
|
|
169
|
+
|-----------|---------|-----------|---------|
|
|
170
|
+
| wip-branch-guard | v1.9.30 | v1.9.36 | @wipcomputer/wip-branch-guard |
|
|
171
|
+
| memory-crystal | v0.7.24 | v0.7.26 | @wipcomputer/memory-crystal |
|
|
172
|
+
```
|
|
173
|
+
|
|
174
|
+
**Always show a table.** Never collapse updates into a paragraph or bullet list. Every update gets its own row. Show ALL updates, not a summary.
|
|
175
|
+
|
|
176
|
+
When the user says "install":
|
|
166
177
|
```bash
|
|
167
178
|
ldm install # update all registered extensions
|
|
168
179
|
ldm doctor # verify everything works
|
package/bin/ldm.js
CHANGED
|
@@ -684,12 +684,24 @@ async function cmdInstallCatalog() {
|
|
|
684
684
|
|
|
685
685
|
if (DRY_RUN) {
|
|
686
686
|
if (npmUpdates.length > 0) {
|
|
687
|
-
|
|
687
|
+
// Table output
|
|
688
|
+
const nameW = Math.max(10, ...npmUpdates.map(e => e.name.length));
|
|
689
|
+
const curW = Math.max(7, ...npmUpdates.map(e => e.currentVersion.length + 1));
|
|
690
|
+
const latW = Math.max(9, ...npmUpdates.map(e => e.latestVersion.length + 1));
|
|
691
|
+
const pkgW = Math.max(7, ...npmUpdates.map(e => e.catalogNpm.length));
|
|
692
|
+
|
|
693
|
+
const pad = (s, w) => s + ' '.repeat(Math.max(0, w - s.length));
|
|
694
|
+
const hr = ` ${'─'.repeat(nameW + curW + latW + pkgW + 13)}`;
|
|
695
|
+
|
|
696
|
+
console.log('');
|
|
697
|
+
console.log(` ${npmUpdates.length} update(s) available:`);
|
|
698
|
+
console.log('');
|
|
699
|
+
console.log(` ${pad('Extension', nameW)} │ ${pad('Current', curW)} │ ${pad('Available', latW)} │ ${pad('Package', pkgW)}`);
|
|
700
|
+
console.log(hr);
|
|
688
701
|
for (const e of npmUpdates) {
|
|
689
|
-
console.log(`
|
|
702
|
+
console.log(` ${pad(e.name, nameW)} │ ${pad('v' + e.currentVersion, curW)} │ ${pad('v' + e.latestVersion, latW)} │ ${pad(e.catalogNpm, pkgW)}`);
|
|
690
703
|
}
|
|
691
|
-
|
|
692
|
-
if (totalUpdates > 0) {
|
|
704
|
+
console.log('');
|
|
693
705
|
console.log(' No data (crystal.db, agent files) would be touched.');
|
|
694
706
|
console.log(' Old versions would be moved to ~/.ldm/_trash/ (never deleted).');
|
|
695
707
|
} else {
|
|
@@ -887,6 +899,29 @@ async function cmdDoctor() {
|
|
|
887
899
|
}
|
|
888
900
|
}
|
|
889
901
|
|
|
902
|
+
// --fix: clean stale MCP entries from ~/.claude.json (tmp paths, ldm-install- names)
|
|
903
|
+
if (FIX_FLAG) {
|
|
904
|
+
const ccUserPath = join(HOME, '.claude.json');
|
|
905
|
+
const ccUser = readJSON(ccUserPath);
|
|
906
|
+
if (ccUser?.mcpServers) {
|
|
907
|
+
const staleMcp = [];
|
|
908
|
+
for (const [name, cfg] of Object.entries(ccUser.mcpServers)) {
|
|
909
|
+
const args = cfg.args || [];
|
|
910
|
+
const isTmpPath = args.some(a => a.startsWith('/tmp/') || a.startsWith('/private/tmp/'));
|
|
911
|
+
const isTmpName = name.startsWith('ldm-install-') || name.startsWith('wip-install-');
|
|
912
|
+
if (isTmpPath || isTmpName) staleMcp.push(name);
|
|
913
|
+
}
|
|
914
|
+
for (const name of staleMcp) {
|
|
915
|
+
delete ccUser.mcpServers[name];
|
|
916
|
+
console.log(` + Removed stale MCP: ${name}`);
|
|
917
|
+
issues = Math.max(0, issues - 1);
|
|
918
|
+
}
|
|
919
|
+
if (staleMcp.length > 0) {
|
|
920
|
+
writeFileSync(ccUserPath, JSON.stringify(ccUser, null, 2) + '\n');
|
|
921
|
+
}
|
|
922
|
+
}
|
|
923
|
+
}
|
|
924
|
+
|
|
890
925
|
// 4. Check sacred locations
|
|
891
926
|
const sacred = [
|
|
892
927
|
{ 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);
|