@wipcomputer/wip-ldm-os 0.4.9 → 0.4.11

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 +7 -1
  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.9"
8
+ version: "0.4.11"
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
@@ -64,8 +64,13 @@ const LOCK_PATH = join(LDM_ROOT, 'state', '.ldm-install.lock');
64
64
 
65
65
  function acquireInstallLock() {
66
66
  try {
67
+ // Child processes spawned by `ldm install` inherit this env var
68
+ if (process.env.LDM_INSTALL_LOCK_PID) return true;
69
+
67
70
  if (existsSync(LOCK_PATH)) {
68
71
  const lock = JSON.parse(readFileSync(LOCK_PATH, 'utf8'));
72
+ // Re-entrant: if we already hold the lock, allow it
73
+ if (lock.pid === process.pid) return true;
69
74
  // Check if PID is still alive
70
75
  try {
71
76
  process.kill(lock.pid, 0); // signal 0 = just check if alive
@@ -80,6 +85,7 @@ function acquireInstallLock() {
80
85
  }
81
86
  mkdirSync(dirname(LOCK_PATH), { recursive: true });
82
87
  writeFileSync(LOCK_PATH, JSON.stringify({ pid: process.pid, started: new Date().toISOString() }));
88
+ process.env.LDM_INSTALL_LOCK_PID = String(process.pid);
83
89
 
84
90
  // Clean up on exit
85
91
  const cleanup = () => { try { if (existsSync(LOCK_PATH)) { const l = JSON.parse(readFileSync(LOCK_PATH, 'utf8')); if (l.pid === process.pid) unlinkSync(LOCK_PATH); } } catch {} };
@@ -597,7 +603,7 @@ function autoDetectExtensions() {
597
603
  // ── ldm install (bare): scan system, show real state, update if needed ──
598
604
 
599
605
  async function cmdInstallCatalog() {
600
- if (!DRY_RUN && !acquireInstallLock()) return;
606
+ // No lock here. cmdInstall() already holds it when calling this.
601
607
 
602
608
  autoDetectExtensions();
603
609
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@wipcomputer/wip-ldm-os",
3
- "version": "0.4.9",
3
+ "version": "0.4.11",
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",