@wipcomputer/wip-ldm-os 0.4.22 → 0.4.24

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.22"
8
+ version: "0.4.24"
9
9
  homepage: "https://github.com/wipcomputer/wip-ldm-os"
10
10
  author: "Parker Todd Brooks"
11
11
  category: infrastructure
package/lib/deploy.mjs CHANGED
@@ -683,7 +683,38 @@ export function installSingleTool(toolPath) {
683
683
 
684
684
  if (ifaceNames.length === 0) return 0;
685
685
 
686
- const toolName = pkg?.name?.replace(/^@\w+\//, '') || basename(toolPath);
686
+ // Derive tool name from package.json, never from /tmp/ clone path
687
+ let toolName = pkg?.name?.replace(/^@\w+\//, '') || basename(toolPath);
688
+ // Strip ldm-install- prefix if it leaked from clone path
689
+ toolName = toolName.replace(/^ldm-install-/, '');
690
+
691
+ // Migrate ldm-install-* ghost directories (#96)
692
+ // Old installs used /tmp/ldm-install-<name> as source, which leaked into the directory name.
693
+ // If both ldm-install-<name> and <name> exist, remove the ghost and clean the registry.
694
+ const ghostName = `ldm-install-${toolName}`;
695
+ const ghostPath = join(LDM_EXTENSIONS, ghostName);
696
+ if (existsSync(ghostPath) && ghostName !== toolName) {
697
+ if (!DRY_RUN) {
698
+ const trashDir = join(LDM_ROOT, '_trash', new Date().toISOString().split('T')[0]);
699
+ try {
700
+ mkdirSync(trashDir, { recursive: true });
701
+ const trashDest = join(trashDir, ghostName);
702
+ cpSync(ghostPath, trashDest, { recursive: true });
703
+ execSync(`rm -rf "${ghostPath}"`, { stdio: 'pipe' });
704
+ // Clean registry
705
+ const registry = loadRegistry();
706
+ if (registry.extensions?.[ghostName]) {
707
+ delete registry.extensions[ghostName];
708
+ saveRegistry(registry);
709
+ }
710
+ log(`Migrated ghost directory: ${ghostName} -> _trash/ (real name: ${toolName})`);
711
+ } catch (e) {
712
+ log(`Warning: could not migrate ${ghostName}: ${e.message}`);
713
+ }
714
+ } else {
715
+ log(`Would migrate ghost directory: ${ghostName} -> _trash/ (real name: ${toolName})`);
716
+ }
717
+ }
687
718
 
688
719
  if (!JSON_OUTPUT) {
689
720
  console.log('');
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@wipcomputer/wip-ldm-os",
3
- "version": "0.4.22",
3
+ "version": "0.4.24",
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",