@wipcomputer/wip-ldm-os 0.4.73-alpha.3 → 0.4.73-alpha.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 (2) hide show
  1. package/bin/ldm.js +46 -3
  2. package/package.json +1 -1
package/bin/ldm.js CHANGED
@@ -2206,13 +2206,56 @@ async function cmdInstallCatalog() {
2206
2206
  continue;
2207
2207
  }
2208
2208
 
2209
- if (!entry.catalogRepo) {
2209
+ if (!entry.catalogRepo && !entry.catalogNpm) {
2210
2210
  console.log(` Skipping ${entry.name}: no catalog repo (install manually with ldm install <org/repo>)`);
2211
2211
  continue;
2212
2212
  }
2213
- console.log(` Updating ${entry.name} v${entry.currentVersion} -> v${entry.latestVersion} (from ${entry.catalogRepo})...`);
2213
+
2214
+ // Source resolution chain (#264):
2215
+ // 1. npm (when --alpha/--beta or npm package available) - works online, any machine
2216
+ // 2. Local private repo (offline, developer machine) - works without internet
2217
+ // 3. GitHub clone (fallback) - works online, any machine
2218
+ let installSource = null;
2219
+ const npmTag = ALPHA_FLAG ? 'alpha' : BETA_FLAG ? 'beta' : null;
2220
+
2221
+ // Try npm first when using alpha/beta tracks or when npm is available
2222
+ if (entry.catalogNpm && (npmTag || !entry.catalogRepo)) {
2223
+ const ver = npmTag ? `${entry.catalogNpm}@${npmTag}` : `${entry.catalogNpm}@${entry.latestVersion}`;
2224
+ installSource = ver;
2225
+ console.log(` Updating ${entry.name} v${entry.currentVersion} -> v${entry.latestVersion} (from npm ${npmTag || 'latest'})...`);
2226
+ }
2227
+
2228
+ // Try local private repo (for offline/developer installs)
2229
+ if (!installSource && entry.catalogRepo) {
2230
+ const repoName = basename(entry.catalogRepo);
2231
+ const privateRepoName = repoName + '-private';
2232
+ const WORKSPACE = join(HOME, 'wipcomputerinc');
2233
+ // Search known repo locations
2234
+ const searchDirs = ['repos/ldm-os/devops', 'repos/ldm-os/components', 'repos/ldm-os/utilities', 'repos/ldm-os/apps', 'repos/ldm-os/apis', 'repos/ldm-os/identity'];
2235
+ for (const dir of searchDirs) {
2236
+ const localPrivate = join(WORKSPACE, dir, privateRepoName);
2237
+ const localPublic = join(WORKSPACE, dir, repoName);
2238
+ if (existsSync(localPrivate)) {
2239
+ installSource = localPrivate;
2240
+ console.log(` Updating ${entry.name} v${entry.currentVersion} -> v${entry.latestVersion} (from local ${privateRepoName})...`);
2241
+ break;
2242
+ }
2243
+ if (existsSync(localPublic)) {
2244
+ installSource = localPublic;
2245
+ console.log(` Updating ${entry.name} v${entry.currentVersion} -> v${entry.latestVersion} (from local ${repoName})...`);
2246
+ break;
2247
+ }
2248
+ }
2249
+ }
2250
+
2251
+ // Fallback: GitHub clone
2252
+ if (!installSource) {
2253
+ installSource = entry.catalogRepo;
2254
+ console.log(` Updating ${entry.name} v${entry.currentVersion} -> v${entry.latestVersion} (from ${entry.catalogRepo})...`);
2255
+ }
2256
+
2214
2257
  try {
2215
- execSync(`ldm install ${entry.catalogRepo}`, { stdio: 'inherit' });
2258
+ execSync(`ldm install ${installSource}`, { stdio: 'inherit' });
2216
2259
  updated++;
2217
2260
 
2218
2261
  // For parent packages, update registry version for all sub-tools (#139, #262)
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@wipcomputer/wip-ldm-os",
3
- "version": "0.4.73-alpha.3",
3
+ "version": "0.4.73-alpha.4",
4
4
  "type": "module",
5
5
  "description": "LDM OS: identity, memory, and sovereignty infrastructure for AI agents",
6
6
  "engines": {