@wipcomputer/wip-ldm-os 0.4.68 → 0.4.70

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/lib/deploy.mjs +20 -16
  3. package/package.json +1 -1
package/SKILL.md CHANGED
@@ -9,7 +9,7 @@ license: MIT
9
9
  compatibility: Requires git, npm, node. Node.js 18+.
10
10
  metadata:
11
11
  display-name: "LDM OS"
12
- version: "0.4.68"
12
+ version: "0.4.70"
13
13
  homepage: "https://github.com/wipcomputer/wip-ldm-os"
14
14
  author: "Parker Todd Brooks"
15
15
  category: infrastructure
package/lib/deploy.mjs CHANGED
@@ -240,17 +240,17 @@ function resolveLocalDeps(repoPath) {
240
240
  const extDir = join(LDM_EXTENSIONS, name);
241
241
  if (existsSync(extDir)) {
242
242
  const targetModules = join(repoPath, 'node_modules', name);
243
- if (!existsSync(targetModules)) {
244
- mkdirSync(join(repoPath, 'node_modules'), { recursive: true });
245
- // Handle scoped packages (e.g. @scope/name)
246
- const scopeDir = dirname(targetModules);
247
- if (scopeDir !== join(repoPath, 'node_modules')) {
248
- mkdirSync(scopeDir, { recursive: true });
249
- }
250
- symlinkSync(extDir, targetModules);
251
- log(`Linked local dep: ${name} -> ${extDir}`);
252
- resolved++;
243
+ mkdirSync(join(repoPath, 'node_modules'), { recursive: true });
244
+ // Handle scoped packages (e.g. @scope/name)
245
+ const scopeDir = dirname(targetModules);
246
+ if (scopeDir !== join(repoPath, 'node_modules')) {
247
+ mkdirSync(scopeDir, { recursive: true });
253
248
  }
249
+ // Remove existing entry (broken symlink or dir from npm) before creating fresh symlink
250
+ try { rmSync(targetModules, { recursive: true, force: true }); } catch {}
251
+ symlinkSync(extDir, targetModules);
252
+ log(`Linked local dep: ${name} -> ${extDir}`);
253
+ resolved++;
254
254
  } else {
255
255
  log(`Dep ${name} not installed at ${extDir}, build may fail for this feature`);
256
256
  }
@@ -277,15 +277,19 @@ function runBuildIfNeeded(repoPath) {
277
277
  } else if (hasBuildScript) {
278
278
  log(`Building ${pkg.name || basename(repoPath)}...`);
279
279
  try {
280
- // Resolve file: deps from local LDM extensions before npm install.
281
- // Without this, npm install fails for repos like memory-crystal that
282
- // depend on file:../dream-weaver-protocol-private (sibling doesn't exist in clones).
283
- resolveLocalDeps(repoPath);
284
-
285
- // Install deps first if node_modules is missing
280
+ // 1. Install deps first (gets devDependencies like tsup).
281
+ // npm may warn about unresolvable file: deps but still installs the rest.
286
282
  if (!existsSync(join(repoPath, 'node_modules'))) {
287
283
  execSync('npm install', { cwd: repoPath, stdio: 'pipe' });
288
284
  }
285
+
286
+ // 2. Resolve file: deps from local LDM extensions AFTER npm install.
287
+ // npm install can remove or overwrite symlinks, so this must run second.
288
+ // Without this, repos like memory-crystal that depend on
289
+ // file:../dream-weaver-protocol-private fail to build (sibling doesn't exist in clones).
290
+ resolveLocalDeps(repoPath);
291
+
292
+ // 3. Build.
289
293
  execSync('npm run build', { cwd: repoPath, stdio: 'pipe' });
290
294
  ok(`Build complete`);
291
295
  } catch (e) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@wipcomputer/wip-ldm-os",
3
- "version": "0.4.68",
3
+ "version": "0.4.70",
4
4
  "type": "module",
5
5
  "description": "LDM OS: identity, memory, and sovereignty infrastructure for AI agents",
6
6
  "engines": {