@localskills/cli 0.1.9 → 0.2.0

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/dist/index.js +7 -6
  2. package/package.json +1 -1
package/dist/index.js CHANGED
@@ -2362,7 +2362,8 @@ var installCommand = new Command2("install").description("Install a skill locall
2362
2362
  }
2363
2363
  const { skill, content, version } = res.data;
2364
2364
  spinner.stop(`Fetched ${skill.name} v${version}`);
2365
- store(slug, content, skill, version);
2365
+ const cacheKey = skill.publicId || slug;
2366
+ store(cacheKey, content, skill, version);
2366
2367
  const contentType = skill.type ?? "skill";
2367
2368
  const installations = [];
2368
2369
  const results = [];
@@ -2378,10 +2379,10 @@ var installCommand = new Command2("install").description("Install a skill locall
2378
2379
  continue;
2379
2380
  }
2380
2381
  const actualMethod = adapter.defaultMethod(scope) === "section" ? "section" : method;
2381
- const cachePath = getPlatformFile(slug, platformId, skill);
2382
+ const cachePath = getPlatformFile(cacheKey, platformId, skill);
2382
2383
  const transformed = adapter.transformContent(content, skill);
2383
2384
  const installedPath = adapter.install({
2384
- slug,
2385
+ slug: cacheKey,
2385
2386
  content: transformed,
2386
2387
  scope,
2387
2388
  method: actualMethod,
@@ -2401,9 +2402,9 @@ var installCommand = new Command2("install").description("Install a skill locall
2401
2402
  const methodLabel = actualMethod === "symlink" ? "symlinked" : actualMethod === "section" ? "section" : "copied";
2402
2403
  results.push(`${desc.name} \u2192 ${installedPath} (${methodLabel})`);
2403
2404
  }
2404
- const existing = config.installed_skills[slug];
2405
+ const existing = config.installed_skills[cacheKey];
2405
2406
  const skillRecord = {
2406
- slug,
2407
+ slug: cacheKey,
2407
2408
  name: skill.name,
2408
2409
  type: contentType,
2409
2410
  hash: skill.contentHash,
@@ -2411,7 +2412,7 @@ var installCommand = new Command2("install").description("Install a skill locall
2411
2412
  cachedAt: (/* @__PURE__ */ new Date()).toISOString(),
2412
2413
  installations: existing ? [...existing.installations, ...installations] : installations
2413
2414
  };
2414
- config.installed_skills[slug] = skillRecord;
2415
+ config.installed_skills[cacheKey] = skillRecord;
2415
2416
  saveConfig(config);
2416
2417
  for (const r of results) {
2417
2418
  R2.success(r);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@localskills/cli",
3
- "version": "0.1.9",
3
+ "version": "0.2.0",
4
4
  "description": "CLI for localskills.sh — install agent skills locally",
5
5
  "type": "module",
6
6
  "bin": {