@wipcomputer/wip-ldm-os 0.3.2 → 0.3.4

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 +23 -4
  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.3.2"
8
+ version: "0.3.4"
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
@@ -45,6 +45,19 @@ try {
45
45
  CATALOG = JSON.parse(readFileSync(catalogPath, 'utf8'));
46
46
  } catch {}
47
47
 
48
+ // Auto-sync version.json when CLI version drifts (#33)
49
+ // npm install -g updates the binary but not version.json. Fix it on any CLI invocation.
50
+ if (existsSync(VERSION_PATH)) {
51
+ try {
52
+ const v = JSON.parse(readFileSync(VERSION_PATH, 'utf8'));
53
+ if (v.version && v.version !== PKG_VERSION) {
54
+ v.version = PKG_VERSION;
55
+ v.updated = new Date().toISOString();
56
+ writeFileSync(VERSION_PATH, JSON.stringify(v, null, 2) + '\n');
57
+ }
58
+ } catch {}
59
+ }
60
+
48
61
  const args = process.argv.slice(2);
49
62
  const command = args[0];
50
63
  const DRY_RUN = args.includes('--dry-run');
@@ -111,8 +124,11 @@ function cleanStaleHooks() {
111
124
  const match = h.command.match(/node\s+"?([^"]+)"?\s*$/);
112
125
  if (!match) return true; // keep non-node commands
113
126
  const scriptPath = match[1];
114
- if (existsSync(scriptPath)) return true;
115
- console.log(` + Removed stale hook: ${event} -> ${scriptPath}`);
127
+ // /tmp/ paths will vanish on reboot, always treat as stale
128
+ const isTmp = scriptPath.startsWith('/tmp/') || scriptPath.startsWith('/private/tmp/');
129
+ if (existsSync(scriptPath) && !isTmp) return true;
130
+ const reason = isTmp ? '(temp path, will break on reboot)' : '(missing)';
131
+ console.log(` + Removed stale hook: ${event} -> ${scriptPath} ${reason}`);
116
132
  cleaned++;
117
133
  return false;
118
134
  });
@@ -749,10 +765,13 @@ async function cmdDoctor() {
749
765
  if (!h.command) continue;
750
766
  const match = h.command.match(/node\s+"?([^"]+)"?\s*$/);
751
767
  if (!match) continue;
752
- if (!existsSync(match[1])) {
768
+ const hookPath = match[1];
769
+ const isTmpPath = hookPath.startsWith('/tmp/') || hookPath.startsWith('/private/tmp/');
770
+ if (!existsSync(hookPath) || isTmpPath) {
753
771
  staleHooks++;
754
772
  if (!FIX_FLAG) {
755
- console.log(` ! Stale hook: ${event} -> ${match[1]}`);
773
+ const reason = isTmpPath ? '(temp path)' : '(missing)';
774
+ console.log(` ! Stale hook: ${event} -> ${hookPath} ${reason}`);
756
775
  }
757
776
  }
758
777
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@wipcomputer/wip-ldm-os",
3
- "version": "0.3.2",
3
+ "version": "0.3.4",
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",