@wipcomputer/wip-ldm-os 0.4.20 → 0.4.22

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 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.22"
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
@@ -670,8 +670,9 @@ async function cmdInstallCatalog() {
670
670
  console.log(` CLI updated to v${latest}. Re-running with new code...`);
671
671
  console.log('');
672
672
  // Re-exec with the new binary. LDM_SELF_UPDATED prevents infinite loop.
673
- const newArgs = process.argv.slice(1);
674
- execSync(`LDM_SELF_UPDATED=1 ldm ${newArgs.join(' ')}`, { stdio: 'inherit' });
673
+ // process.argv.slice(2) skips 'node' and the script path, keeps just 'install' + flags
674
+ const reArgs = process.argv.slice(2).join(' ') || 'install';
675
+ execSync(`LDM_SELF_UPDATED=1 ldm ${reArgs}`, { stdio: 'inherit' });
675
676
  process.exit(0);
676
677
  } catch (e) {
677
678
  console.log(` ! Self-update failed: ${e.message}. Continuing with v${PKG_VERSION}.`);
@@ -875,6 +876,50 @@ async function cmdInstallCatalog() {
875
876
  console.log(' Old versions would be moved to ~/.ldm/_trash/ (never deleted).');
876
877
  }
877
878
 
879
+ // Health check preview (dry-run)
880
+ const healthIssues = [];
881
+
882
+ // Check missing CLIs
883
+ for (const comp of components) {
884
+ if (!comp.npm || !comp.cliMatches || comp.cliMatches.length === 0) continue;
885
+ if (!isCatalogItemInstalled(comp)) continue;
886
+ for (const binName of comp.cliMatches) {
887
+ try { execSync(`which ${binName} 2>/dev/null`, { encoding: 'utf8' }); }
888
+ catch { healthIssues.push(` ! CLI "${binName}" missing (would reinstall ${comp.npm})`); }
889
+ }
890
+ }
891
+
892
+ // Check /tmp/ symlinks
893
+ try {
894
+ const npmPrefix = execSync('npm config get prefix', { encoding: 'utf8', timeout: 5000 }).trim();
895
+ const globalModules = join(npmPrefix, 'lib', 'node_modules', '@wipcomputer');
896
+ if (existsSync(globalModules)) {
897
+ for (const entry of readdirSync(globalModules, { withFileTypes: true })) {
898
+ if (!entry.isSymbolicLink()) continue;
899
+ try {
900
+ const target = readlinkSync(join(globalModules, entry.name));
901
+ if (target.includes('/tmp/') || target.includes('/private/tmp/')) {
902
+ healthIssues.push(` ! @wipcomputer/${entry.name} symlinked to /tmp/ (would reinstall from npm)`);
903
+ }
904
+ } catch {}
905
+ }
906
+ }
907
+ } catch {}
908
+
909
+ // Check orphaned /tmp/ dirs
910
+ try {
911
+ const tmpCount = readdirSync('/private/tmp').filter(d => d.startsWith('ldm-install-')).length;
912
+ if (tmpCount > 0) {
913
+ healthIssues.push(` ! ${tmpCount} orphaned /tmp/ldm-install-* dirs (would clean up)`);
914
+ }
915
+ } catch {}
916
+
917
+ if (healthIssues.length > 0) {
918
+ console.log('');
919
+ console.log(' Health issues (would fix on install):');
920
+ for (const h of healthIssues) console.log(h);
921
+ }
922
+
878
923
  console.log('');
879
924
  console.log(' Dry run complete. No changes made.');
880
925
  console.log('');
@@ -985,7 +1030,7 @@ async function cmdInstallCatalog() {
985
1030
  try {
986
1031
  execSync(`npm install -g ${comp.npm}`, { stdio: 'inherit', timeout: 60000 });
987
1032
  healthFixes++;
988
- ok(`CLI: ${binName} restored`);
1033
+ console.log(` + CLI: ${binName} restored`);
989
1034
  } catch (e) {
990
1035
  console.error(` x Failed to restore ${binName}: ${e.message}`);
991
1036
  }
@@ -1008,7 +1053,7 @@ async function cmdInstallCatalog() {
1008
1053
  try {
1009
1054
  execSync(`npm install -g ${pkgName}`, { stdio: 'inherit', timeout: 60000 });
1010
1055
  healthFixes++;
1011
- ok(`${pkgName}: replaced /tmp/ symlink with registry install`);
1056
+ console.log(` + ${pkgName}: replaced /tmp/ symlink with registry install`);
1012
1057
  } catch (e) {
1013
1058
  console.error(` x Failed to fix ${pkgName}: ${e.message}`);
1014
1059
  }
@@ -1027,7 +1072,7 @@ async function cmdInstallCatalog() {
1027
1072
  try { execSync(`rm -rf "/private/tmp/${d}"`, { stdio: 'pipe', timeout: 10000 }); } catch {}
1028
1073
  }
1029
1074
  healthFixes++;
1030
- ok(`Cleaned ${tmpDirs.length} orphaned /tmp/ clone(s)`);
1075
+ console.log(` + Cleaned ${tmpDirs.length} orphaned /tmp/ clone(s)`);
1031
1076
  }
1032
1077
  } catch {}
1033
1078
 
package/catalog.json CHANGED
@@ -51,10 +51,10 @@
51
51
  "id": "wip-ai-devops-toolbox",
52
52
  "name": "AI DevOps Toolbox",
53
53
  "description": "Release pipeline, license compliance, repo management, identity file protection.",
54
- "npm": "@wipcomputer/universal-installer",
54
+ "npm": "@wipcomputer/wip-ai-devops-toolbox",
55
55
  "repo": "wipcomputer/wip-ai-devops-toolbox",
56
- "registryMatches": ["wip-repos", "wip-release", "wip-file-guard", "wip-license-hook", "wip-repo-permissions-hook", "universal-installer", "deploy-public", "post-merge-rename", "wip-license-guard", "wip-repo-init", "wip-readme-format", "wip-branch-guard"],
57
- "cliMatches": ["wip-release", "wip-repos", "wip-file-guard", "wip-install", "wip-branch-guard"],
56
+ "registryMatches": ["wip-repos", "wip-release", "wip-file-guard", "wip-license-hook", "wip-repo-permissions-hook", "deploy-public", "post-merge-rename", "wip-license-guard", "wip-repo-init", "wip-readme-format", "wip-branch-guard"],
57
+ "cliMatches": ["wip-release", "wip-repos", "wip-file-guard", "wip-branch-guard"],
58
58
  "recommended": false,
59
59
  "status": "stable",
60
60
  "postInstall": null,
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.22",
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",