skill-land 1.3.0 → 1.3.1

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/package.json +1 -1
  2. package/skill-land.mjs +11 -8
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "skill-land",
3
- "version": "1.3.0",
3
+ "version": "1.3.1",
4
4
  "description": "Install an agent skill to the directory the agent actually reads, then verify it landed. Exits non-zero if it didn't.",
5
5
  "keywords": [
6
6
  "agent-skills",
package/skill-land.mjs CHANGED
@@ -407,6 +407,7 @@ function runSkill(skillPath, root, quiet) {
407
407
  }
408
408
 
409
409
  const bad = [];
410
+ const baseSummaries = [];
410
411
  let targetCount = 0;
411
412
 
412
413
  for (const agent of targets) {
@@ -453,7 +454,11 @@ function runSkill(skillPath, root, quiet) {
453
454
  if (!checks.every((c) => c.pass)) badFiles.push({ target, rel: f.rel, checks });
454
455
  }
455
456
 
456
- baseResults.push({ destDir, badFiles, passed: badFiles.length === 0 });
457
+ const absent = badFiles.length === files.length
458
+ && badFiles.every((b) => b.checks.some((c) => c.name === "file exists" && !c.pass));
459
+ baseResults.push({ destDir, badFiles, passed: badFiles.length === 0, absent });
460
+ baseSummaries.push({ destDir, passed: badFiles.length === 0, absent,
461
+ n: files.length - badFiles.length });
457
462
  }
458
463
 
459
464
  if (!dryRun) {
@@ -475,9 +480,7 @@ function runSkill(skillPath, root, quiet) {
475
480
  // Nothing present at all is one fact, not N failures. Listing every
476
481
  // absent file buries the directories that are partially installed,
477
482
  // which are the ones worth looking at.
478
- const absent = r.badFiles.length === files.length
479
- && r.badFiles.every((b) => b.checks.some((c) => c.name === "file exists" && !c.pass));
480
- if (absent) {
483
+ if (r.absent) {
481
484
  console.log(` FAIL ${r.destDir} not installed${verifyOnly ? " (verify only)" : ""}`);
482
485
  continue;
483
486
  }
@@ -505,11 +508,11 @@ function runSkill(skillPath, root, quiet) {
505
508
  const nf = `${files.length} file${files.length === 1 ? "" : "s"}`;
506
509
  if (dryRun) console.log(`-- ${targetCount} target${targetCount === 1 ? "" : "s"}, ${nf} (dry run)`);
507
510
  else console.log(`${skillFailed ? "FAIL" : "OK "} ${nf}`);
508
- for (const b of bad.slice(0, 10)) {
509
- console.log(` x ${b.target}`);
510
- for (const c of b.checks) if (!c.pass) console.log(` ${c.name}: ${c.detail}`);
511
+ // Per directory, not per file. Flattening 3 paths x 148 files into one list
512
+ // buries the only thing that is actionable: which directory is wrong, and how.
513
+ for (const b of baseSummaries.filter((x) => !x.passed)) {
514
+ console.log(` x ${b.destDir} ${b.absent ? "not installed" : `${b.n}/${files.length} files`}`);
511
515
  }
512
- if (bad.length > 10) console.log(` ... and ${bad.length - 10} more file(s)`);
513
516
  }
514
517
  return { name: skillName, failed: skillFailed, skipped: skillSkipped };
515
518
  }