@wipcomputer/wip-ldm-os 0.4.33 → 0.4.35

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.33"
8
+ version: "0.4.35"
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
@@ -778,10 +778,35 @@ async function cmdInstallCatalog() {
778
778
  cleaned++;
779
779
  continue;
780
780
  }
781
- // Remove ldm-install- prefixed entries (ghost from /tmp/ clones)
781
+ // Rename ldm-install- prefixed entries to clean names (#141)
782
782
  if (name.startsWith('ldm-install-')) {
783
783
  const cleanName = name.replace(/^ldm-install-/, '');
784
+ // Transfer registry entry to clean name
785
+ if (!registry.extensions[cleanName]) {
786
+ registry.extensions[cleanName] = { ...registry.extensions[name] };
787
+ }
784
788
  delete registry.extensions[name];
789
+ // Rename the actual directory if it exists
790
+ if (!DRY_RUN) {
791
+ const ghostDir = join(LDM_EXTENSIONS, name);
792
+ const cleanDir = join(LDM_EXTENSIONS, cleanName);
793
+ if (existsSync(ghostDir) && !existsSync(cleanDir)) {
794
+ try {
795
+ execSync(`mv "${ghostDir}" "${cleanDir}"`, { stdio: 'pipe' });
796
+ } catch {}
797
+ } else if (existsSync(ghostDir) && existsSync(cleanDir)) {
798
+ // Clean version exists, remove ghost
799
+ try { execSync(`rm -rf "${ghostDir}"`, { stdio: 'pipe' }); } catch {}
800
+ }
801
+ // Same for OC extensions
802
+ const ocGhost = join(HOME, '.openclaw', 'extensions', name);
803
+ const ocClean = join(HOME, '.openclaw', 'extensions', cleanName);
804
+ if (existsSync(ocGhost) && !existsSync(ocClean)) {
805
+ try { execSync(`mv "${ocGhost}" "${ocClean}"`, { stdio: 'pipe' }); } catch {}
806
+ } else if (existsSync(ocGhost) && existsSync(ocClean)) {
807
+ try { execSync(`rm -rf "${ocGhost}"`, { stdio: 'pipe' }); } catch {}
808
+ }
809
+ }
785
810
  cleaned++;
786
811
  }
787
812
  }
@@ -820,7 +845,7 @@ async function cmdInstallCatalog() {
820
845
  const extPkgPath = join(LDM_EXTENSIONS, name, 'package.json');
821
846
  const extPkg = readJSON(extPkgPath);
822
847
  const npmPkg = extPkg?.name;
823
- if (!npmPkg || !npmPkg.startsWith('@')) continue; // skip unscoped packages
848
+ if (!npmPkg) continue; // no package name, skip
824
849
 
825
850
  // Find catalog entry for the repo URL (used for clone if update needed)
826
851
  const catalogEntry = components.find(c => {
@@ -1493,7 +1518,7 @@ function cmdStatus() {
1493
1518
  const extPkgPath = join(LDM_EXTENSIONS, name, 'package.json');
1494
1519
  const extPkg = readJSON(extPkgPath);
1495
1520
  const npmPkg = extPkg?.name;
1496
- if (!npmPkg || !npmPkg.startsWith('@')) continue;
1521
+ if (!npmPkg) continue;
1497
1522
  const currentVersion = extPkg.version || info.version;
1498
1523
  if (!currentVersion) continue;
1499
1524
  try {
package/catalog.json CHANGED
@@ -281,6 +281,23 @@
281
281
  "skill": "SKILL.md (protocol documentation for agents)",
282
282
  "docs": "19-page paper on memory consolidation. No runtime components."
283
283
  }
284
+ },
285
+ {
286
+ "id": "tavily",
287
+ "name": "Tavily",
288
+ "description": "Web search and content extraction via Tavily API.",
289
+ "npm": "tavily",
290
+ "repo": null,
291
+ "registryMatches": [
292
+ "tavily"
293
+ ],
294
+ "cliMatches": [],
295
+ "recommended": false,
296
+ "status": "stable",
297
+ "postInstall": null,
298
+ "installs": {
299
+ "ocPlugin": "Web search and content extraction"
300
+ }
284
301
  }
285
302
  ]
286
303
  }
package/lib/deploy.mjs CHANGED
@@ -706,7 +706,7 @@ export function installSingleTool(toolPath) {
706
706
  mkdirSync(trashDir, { recursive: true });
707
707
  const trashDest = join(trashDir, ghostName);
708
708
  cpSync(ghostPath, trashDest, { recursive: true });
709
- execSync(`rm -rf "${ghostPath}"`, { stdio: 'pipe' });
709
+ rmSync(ghostPath, { recursive: true, force: true });
710
710
  // Clean registry
711
711
  const registry = loadRegistry();
712
712
  if (registry.extensions?.[ghostName]) {
@@ -932,7 +932,7 @@ function removeSkill(name) {
932
932
  const skillDir = join(OC_ROOT, 'skills', name);
933
933
  try {
934
934
  if (existsSync(skillDir)) {
935
- execSync(`rm -rf "${skillDir}"`, { stdio: 'pipe' });
935
+ rmSync(skillDir, { recursive: true, force: true });
936
936
  }
937
937
  } catch {}
938
938
  }
package/lib/log.mjs ADDED
@@ -0,0 +1,15 @@
1
+ /**
2
+ * lib/log.mjs
3
+ * Lightweight debug logger for LDM OS.
4
+ * Opt-in via LDM_DEBUG=1 environment variable.
5
+ */
6
+
7
+ const DEBUG = process.env.LDM_DEBUG === '1';
8
+
9
+ export function debug(context, msg, err) {
10
+ if (DEBUG) {
11
+ const ts = new Date().toISOString().slice(11, 19);
12
+ const errMsg = err?.message || '';
13
+ console.error(`[ldm:${context}] ${ts} ${msg}${errMsg ? ' ... ' + errMsg : ''}`);
14
+ }
15
+ }
package/package.json CHANGED
@@ -1,8 +1,11 @@
1
1
  {
2
2
  "name": "@wipcomputer/wip-ldm-os",
3
- "version": "0.4.33",
3
+ "version": "0.4.35",
4
4
  "type": "module",
5
5
  "description": "LDM OS: identity, memory, and sovereignty infrastructure for AI agents",
6
+ "engines": {
7
+ "node": ">=18"
8
+ },
6
9
  "main": "src/boot/boot-hook.mjs",
7
10
  "bin": {
8
11
  "ldm": "bin/ldm.js",
@@ -4,13 +4,14 @@
4
4
  import { execSync, exec } from "node:child_process";
5
5
  import { readdirSync, readFileSync, existsSync, statSync } from "node:fs";
6
6
  import { join, relative, resolve } from "node:path";
7
+ import { homedir } from "node:os";
7
8
  import { promisify } from "node:util";
8
9
 
9
10
  const execAsync = promisify(exec);
10
11
 
11
12
  // ── Constants ─────────────────────────────────────────────────────────
12
13
 
13
- const HOME = process.env.HOME || "/Users/lesa";
14
+ const HOME = process.env.HOME || homedir();
14
15
  export const LDM_ROOT = process.env.LDM_ROOT || join(HOME, ".ldm");
15
16
 
16
17
  // ── Types ────────────────────────────────────────────────────────────