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.
- package/package.json +1 -1
- package/skill-land.mjs +11 -8
package/package.json
CHANGED
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
|
-
|
|
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
|
-
|
|
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
|
-
|
|
509
|
-
|
|
510
|
-
|
|
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
|
}
|