skills 1.0.16 → 1.0.18

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/cli.js +8 -39
  2. package/package.json +1 -1
package/dist/cli.js CHANGED
@@ -12,7 +12,6 @@ import {
12
12
  } from "fs";
13
13
  import { basename, join } from "path";
14
14
  import { homedir } from "os";
15
- import { createHash } from "crypto";
16
15
  var RESET = "\x1B[0m";
17
16
  var BOLD = "\x1B[1m";
18
17
  var DIM = "\x1B[38;5;102m";
@@ -198,11 +197,8 @@ function readSkillLock() {
198
197
  if (typeof parsed.version !== "number" || !parsed.skills) {
199
198
  return { version: CURRENT_LOCK_VERSION, skills: {} };
200
199
  }
201
- if (parsed.version < 2) {
202
- return { version: CURRENT_LOCK_VERSION, skills: {} };
203
- }
204
200
  if (parsed.version < CURRENT_LOCK_VERSION) {
205
- parsed.version = CURRENT_LOCK_VERSION;
201
+ return { version: CURRENT_LOCK_VERSION, skills: {} };
206
202
  }
207
203
  return parsed;
208
204
  } catch {
@@ -316,7 +312,7 @@ async function runGenerateLock(args) {
316
312
  source: match.source,
317
313
  sourceType,
318
314
  sourceUrl,
319
- contentHash: "",
315
+ skillFolderHash: "",
320
316
  installedAt: now,
321
317
  updatedAt: now
322
318
  };
@@ -341,20 +337,6 @@ async function runGenerateLock(args) {
341
337
  console.log(`${TEXT}Lock file updated:${RESET} ${DIM}~/.agents/.skill-lock.json${RESET}`);
342
338
  }
343
339
  }
344
- function computeContentHash(content) {
345
- return createHash("sha256").update(content, "utf-8").digest("hex");
346
- }
347
- function getSkillContentPath(skillName) {
348
- return join(homedir(), AGENTS_DIR, SKILLS_SUBDIR, skillName, "SKILL.md");
349
- }
350
- function readSkillContent(skillName) {
351
- const skillPath = getSkillContentPath(skillName);
352
- try {
353
- return readFileSync(skillPath, "utf-8");
354
- } catch {
355
- return null;
356
- }
357
- }
358
340
  async function runCheck(args = []) {
359
341
  const forceRefresh = true;
360
342
  console.log(`${TEXT}Checking for skill updates...${RESET}`);
@@ -376,21 +358,14 @@ async function runCheck(args = []) {
376
358
  const entry = lock.skills[skillName];
377
359
  if (!entry)
378
360
  continue;
379
- let contentHash = entry.contentHash;
380
- if (!contentHash) {
381
- const content = readSkillContent(skillName);
382
- if (content) {
383
- contentHash = computeContentHash(content);
384
- } else {
385
- console.log(`${DIM}Skipping ${skillName}: cannot read SKILL.md${RESET}`);
386
- continue;
387
- }
361
+ if (!entry.skillFolderHash) {
362
+ console.log(`${DIM}Skipping ${skillName}: no skillFolderHash (reinstall needed)${RESET}`);
363
+ continue;
388
364
  }
389
365
  checkRequest.skills.push({
390
366
  name: skillName,
391
367
  source: entry.source,
392
368
  path: entry.skillPath,
393
- contentHash,
394
369
  skillFolderHash: entry.skillFolderHash
395
370
  });
396
371
  }
@@ -453,20 +428,14 @@ async function runUpdate() {
453
428
  const entry = lock.skills[skillName];
454
429
  if (!entry)
455
430
  continue;
456
- let contentHash = entry.contentHash;
457
- if (!contentHash) {
458
- const content = readSkillContent(skillName);
459
- if (content) {
460
- contentHash = computeContentHash(content);
461
- } else {
462
- continue;
463
- }
431
+ if (!entry.skillFolderHash) {
432
+ console.log(`${DIM}Skipping ${skillName}: no skillFolderHash (reinstall needed)${RESET}`);
433
+ continue;
464
434
  }
465
435
  checkRequest.skills.push({
466
436
  name: skillName,
467
437
  source: entry.source,
468
438
  path: entry.skillPath,
469
- contentHash,
470
439
  skillFolderHash: entry.skillFolderHash
471
440
  });
472
441
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "skills",
3
- "version": "1.0.16",
3
+ "version": "1.0.18",
4
4
  "description": "The open agent skills ecosystem",
5
5
  "type": "module",
6
6
  "bin": {