@wipcomputer/wip-ldm-os 0.4.20 → 0.4.21

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.
Files changed (3) hide show
  1. package/SKILL.md +1 -1
  2. package/bin/ldm.js +47 -3
  3. 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.20"
8
+ version: "0.4.21"
9
9
  homepage: "https://github.com/wipcomputer/wip-ldm-os"
10
10
  author: "Parker Todd Brooks"
11
11
  category: infrastructure
package/bin/ldm.js CHANGED
@@ -875,6 +875,50 @@ async function cmdInstallCatalog() {
875
875
  console.log(' Old versions would be moved to ~/.ldm/_trash/ (never deleted).');
876
876
  }
877
877
 
878
+ // Health check preview (dry-run)
879
+ const healthIssues = [];
880
+
881
+ // Check missing CLIs
882
+ for (const comp of components) {
883
+ if (!comp.npm || !comp.cliMatches || comp.cliMatches.length === 0) continue;
884
+ if (!isCatalogItemInstalled(comp)) continue;
885
+ for (const binName of comp.cliMatches) {
886
+ try { execSync(`which ${binName} 2>/dev/null`, { encoding: 'utf8' }); }
887
+ catch { healthIssues.push(` ! CLI "${binName}" missing (would reinstall ${comp.npm})`); }
888
+ }
889
+ }
890
+
891
+ // Check /tmp/ symlinks
892
+ try {
893
+ const npmPrefix = execSync('npm config get prefix', { encoding: 'utf8', timeout: 5000 }).trim();
894
+ const globalModules = join(npmPrefix, 'lib', 'node_modules', '@wipcomputer');
895
+ if (existsSync(globalModules)) {
896
+ for (const entry of readdirSync(globalModules, { withFileTypes: true })) {
897
+ if (!entry.isSymbolicLink()) continue;
898
+ try {
899
+ const target = readlinkSync(join(globalModules, entry.name));
900
+ if (target.includes('/tmp/') || target.includes('/private/tmp/')) {
901
+ healthIssues.push(` ! @wipcomputer/${entry.name} symlinked to /tmp/ (would reinstall from npm)`);
902
+ }
903
+ } catch {}
904
+ }
905
+ }
906
+ } catch {}
907
+
908
+ // Check orphaned /tmp/ dirs
909
+ try {
910
+ const tmpCount = readdirSync('/private/tmp').filter(d => d.startsWith('ldm-install-')).length;
911
+ if (tmpCount > 0) {
912
+ healthIssues.push(` ! ${tmpCount} orphaned /tmp/ldm-install-* dirs (would clean up)`);
913
+ }
914
+ } catch {}
915
+
916
+ if (healthIssues.length > 0) {
917
+ console.log('');
918
+ console.log(' Health issues (would fix on install):');
919
+ for (const h of healthIssues) console.log(h);
920
+ }
921
+
878
922
  console.log('');
879
923
  console.log(' Dry run complete. No changes made.');
880
924
  console.log('');
@@ -985,7 +1029,7 @@ async function cmdInstallCatalog() {
985
1029
  try {
986
1030
  execSync(`npm install -g ${comp.npm}`, { stdio: 'inherit', timeout: 60000 });
987
1031
  healthFixes++;
988
- ok(`CLI: ${binName} restored`);
1032
+ console.log(` + CLI: ${binName} restored`);
989
1033
  } catch (e) {
990
1034
  console.error(` x Failed to restore ${binName}: ${e.message}`);
991
1035
  }
@@ -1008,7 +1052,7 @@ async function cmdInstallCatalog() {
1008
1052
  try {
1009
1053
  execSync(`npm install -g ${pkgName}`, { stdio: 'inherit', timeout: 60000 });
1010
1054
  healthFixes++;
1011
- ok(`${pkgName}: replaced /tmp/ symlink with registry install`);
1055
+ console.log(` + ${pkgName}: replaced /tmp/ symlink with registry install`);
1012
1056
  } catch (e) {
1013
1057
  console.error(` x Failed to fix ${pkgName}: ${e.message}`);
1014
1058
  }
@@ -1027,7 +1071,7 @@ async function cmdInstallCatalog() {
1027
1071
  try { execSync(`rm -rf "/private/tmp/${d}"`, { stdio: 'pipe', timeout: 10000 }); } catch {}
1028
1072
  }
1029
1073
  healthFixes++;
1030
- ok(`Cleaned ${tmpDirs.length} orphaned /tmp/ clone(s)`);
1074
+ console.log(` + Cleaned ${tmpDirs.length} orphaned /tmp/ clone(s)`);
1031
1075
  }
1032
1076
  } catch {}
1033
1077
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@wipcomputer/wip-ldm-os",
3
- "version": "0.4.20",
3
+ "version": "0.4.21",
4
4
  "type": "module",
5
5
  "description": "LDM OS: identity, memory, and sovereignty infrastructure for AI agents",
6
6
  "main": "src/boot/boot-hook.mjs",