install-agent-skill 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/bin/lib/commands/analyze.js +8 -8
- package/bin/lib/commands/cache.js +5 -5
- package/bin/lib/commands/doctor.js +1 -1
- package/bin/lib/commands/info.js +3 -3
- package/bin/lib/commands/install.js +2 -2
- package/bin/lib/commands/list.js +4 -4
- package/bin/lib/commands/validate.js +4 -4
- package/bin/lib/commands/verify.js +1 -1
- package/bin/lib/ui.js +4 -4
- package/package.json +1 -1
|
@@ -22,23 +22,23 @@ export async function run(skillName) {
|
|
|
22
22
|
|
|
23
23
|
stepLine();
|
|
24
24
|
step(c.bold(`Skill Analysis: ${skillName}`), S.diamondFilled, "cyan");
|
|
25
|
-
console.log(
|
|
25
|
+
console.log(`${c.gray(S.branch)} ${c.dim("Path: " + skillDir)}`);
|
|
26
26
|
stepLine();
|
|
27
27
|
|
|
28
28
|
// SKILL.md frontmatter
|
|
29
29
|
const smp = path.join(skillDir, "SKILL.md");
|
|
30
30
|
if (fs.existsSync(smp)) {
|
|
31
31
|
const m = parseSkillMdFrontmatter(smp);
|
|
32
|
-
console.log(
|
|
33
|
-
console.log(
|
|
34
|
-
console.log(
|
|
35
|
-
if (m.tags) console.log(
|
|
32
|
+
console.log(`${c.gray(S.branch)} ${c.cyan("SKILL.md Frontmatter:")}`);
|
|
33
|
+
console.log(`${c.gray(S.branch)} Name: ${m.name || c.dim("(not set)")}`);
|
|
34
|
+
console.log(`${c.gray(S.branch)} Description: ${m.description ? m.description.substring(0, 60) : c.red("(MISSING)")}`);
|
|
35
|
+
if (m.tags) console.log(`${c.gray(S.branch)} Tags: ${m.tags.join(", ")}`);
|
|
36
36
|
stepLine();
|
|
37
37
|
}
|
|
38
38
|
|
|
39
39
|
// Structure
|
|
40
40
|
const structure = detectSkillStructure(skillDir);
|
|
41
|
-
console.log(
|
|
41
|
+
console.log(`${c.gray(S.branch)} ${c.cyan("Structure:")}`);
|
|
42
42
|
|
|
43
43
|
const items = [
|
|
44
44
|
["resources", structure.hasResources],
|
|
@@ -49,7 +49,7 @@ export async function run(skillName) {
|
|
|
49
49
|
];
|
|
50
50
|
|
|
51
51
|
items.forEach(([n, has]) => {
|
|
52
|
-
console.log(
|
|
52
|
+
console.log(`${c.gray(S.branch)} ${has ? c.green(S.check) : c.dim("○")} ${has ? c.bold(n) : c.dim(n)}`);
|
|
53
53
|
});
|
|
54
54
|
|
|
55
55
|
stepLine();
|
|
@@ -65,6 +65,6 @@ export async function run(skillName) {
|
|
|
65
65
|
if (structure.hasConstitution || structure.hasDoctrines) score += 15;
|
|
66
66
|
|
|
67
67
|
const scoreColor = score >= 80 ? c.green : score >= 50 ? c.yellow : c.red;
|
|
68
|
-
console.log(
|
|
68
|
+
console.log(`${c.gray(S.branch)} ${c.cyan("Antigravity Score:")} ${scoreColor(score + "/100")}`);
|
|
69
69
|
stepLine();
|
|
70
70
|
}
|
|
@@ -39,10 +39,10 @@ export async function run(sub) {
|
|
|
39
39
|
const bs = fs.existsSync(BACKUP_DIR) ? getDirSize(BACKUP_DIR) : 0;
|
|
40
40
|
|
|
41
41
|
step(c.bold("Cache Info"), S.diamondFilled, "cyan");
|
|
42
|
-
console.log(
|
|
43
|
-
console.log(
|
|
44
|
-
console.log(
|
|
45
|
-
console.log(
|
|
42
|
+
console.log(`${c.gray(S.branch)} Location: ${CACHE_ROOT}`);
|
|
43
|
+
console.log(`${c.gray(S.branch)} Registries: ${formatBytes(rs)}`);
|
|
44
|
+
console.log(`${c.gray(S.branch)} Backups: ${formatBytes(bs)}`);
|
|
45
|
+
console.log(`${c.gray(S.branch)} Total: ${formatBytes(getDirSize(CACHE_ROOT))}`);
|
|
46
46
|
stepLine();
|
|
47
47
|
return;
|
|
48
48
|
}
|
|
@@ -56,7 +56,7 @@ export async function run(sub) {
|
|
|
56
56
|
|
|
57
57
|
step(c.bold("Backups"), S.diamondFilled, "cyan");
|
|
58
58
|
stepLine();
|
|
59
|
-
backups.forEach(b => console.log(
|
|
59
|
+
backups.forEach(b => console.log(`${c.gray(S.branch)} ${b.name} (${formatBytes(b.size)})`));
|
|
60
60
|
stepLine();
|
|
61
61
|
return;
|
|
62
62
|
}
|
|
@@ -68,7 +68,7 @@ export async function run() {
|
|
|
68
68
|
}
|
|
69
69
|
|
|
70
70
|
stepLine();
|
|
71
|
-
console.log(
|
|
71
|
+
console.log(`${c.gray(S.branch)} Errors: ${errors}, Warnings: ${warnings}`);
|
|
72
72
|
stepLine();
|
|
73
73
|
|
|
74
74
|
if (STRICT && errors) process.exit(1);
|
package/bin/lib/commands/info.js
CHANGED
|
@@ -21,13 +21,13 @@ export async function run(name) {
|
|
|
21
21
|
|
|
22
22
|
if (fs.existsSync(localDir)) {
|
|
23
23
|
step(`${c.bold(name)} ${c.green("(installed)")}`, S.diamondFilled, "cyan");
|
|
24
|
-
console.log(
|
|
24
|
+
console.log(`${c.gray(S.branch)} ${c.dim("Path: " + localDir)}`);
|
|
25
25
|
|
|
26
26
|
const mf = path.join(localDir, ".skill-source.json");
|
|
27
27
|
if (fs.existsSync(mf)) {
|
|
28
28
|
const m = JSON.parse(fs.readFileSync(mf, "utf-8"));
|
|
29
|
-
console.log(
|
|
30
|
-
console.log(
|
|
29
|
+
console.log(`${c.gray(S.branch)} Repo: ${m.repo || "local"}`);
|
|
30
|
+
console.log(`${c.gray(S.branch)} Installed: ${formatDate(m.installedAt)}`);
|
|
31
31
|
}
|
|
32
32
|
stepLine();
|
|
33
33
|
return;
|
|
@@ -157,7 +157,7 @@ export async function run(spec) {
|
|
|
157
157
|
let boxContent = "";
|
|
158
158
|
for (const sn of selectedSkills) boxContent += `${c.cyan(sn)}\n ${c.dim(targetScope)}\n\n`;
|
|
159
159
|
const box = boxen(boxContent.trim(), { padding: 1, borderStyle: "round", borderColor: "gray", dimBorder: true });
|
|
160
|
-
box.split("\n").forEach(l => console.log(
|
|
160
|
+
box.split("\n").forEach(l => console.log(`${c.gray(S.branch)} ${l}`));
|
|
161
161
|
|
|
162
162
|
stepLine();
|
|
163
163
|
|
|
@@ -178,7 +178,7 @@ export async function run(spec) {
|
|
|
178
178
|
const dest = path.join(targetScope, sn);
|
|
179
179
|
|
|
180
180
|
if (fs.existsSync(dest)) fs.rmSync(dest, { recursive: true, force: true });
|
|
181
|
-
fs.
|
|
181
|
+
await fs.promises.cp(src, dest, { recursive: true });
|
|
182
182
|
|
|
183
183
|
const hash = merkleHash(dest);
|
|
184
184
|
fs.writeFileSync(path.join(dest, ".skill-source.json"), JSON.stringify({
|
package/bin/lib/commands/list.js
CHANGED
|
@@ -13,7 +13,7 @@ import { VERBOSE, JSON_OUTPUT } from "../config.js";
|
|
|
13
13
|
export async function run() {
|
|
14
14
|
stepLine();
|
|
15
15
|
step(c.bold("Installed Skills"), S.diamondFilled, "cyan");
|
|
16
|
-
console.log(
|
|
16
|
+
console.log(`${c.gray(S.branch)} ${c.dim("Location: " + resolveScope())}`);
|
|
17
17
|
stepLine();
|
|
18
18
|
|
|
19
19
|
const skills = getInstalledSkills();
|
|
@@ -31,13 +31,13 @@ export async function run() {
|
|
|
31
31
|
|
|
32
32
|
for (const s of skills) {
|
|
33
33
|
const icon = s.hasSkillMd ? c.green(S.check) : c.yellow(S.diamond);
|
|
34
|
-
console.log(
|
|
34
|
+
console.log(`${c.gray(S.branch)} ${icon} ${c.bold(s.name)} ${c.dim("v" + s.version)} ${c.dim("(" + formatBytes(s.size) + ")")}`);
|
|
35
35
|
if (s.description && VERBOSE) {
|
|
36
|
-
console.log(
|
|
36
|
+
console.log(`${c.gray(S.branch)} ${c.dim(s.description.substring(0, 60))}`);
|
|
37
37
|
}
|
|
38
38
|
}
|
|
39
39
|
|
|
40
40
|
stepLine();
|
|
41
|
-
console.log(
|
|
41
|
+
console.log(`${c.gray(S.branch)} ${c.dim("Total: " + skills.length + " skill(s)")}`);
|
|
42
42
|
stepLine();
|
|
43
43
|
}
|
|
@@ -50,11 +50,11 @@ export async function run(skillName) {
|
|
|
50
50
|
}
|
|
51
51
|
|
|
52
52
|
const status = errors.length > 0 ? c.red("FAIL") : warnings.length > 0 ? c.yellow("WARN") : c.green("PASS");
|
|
53
|
-
console.log(
|
|
53
|
+
console.log(`${c.gray(S.branch)} ${status} ${c.bold(skill.name)}`);
|
|
54
54
|
|
|
55
55
|
if (VERBOSE || errors.length || warnings.length) {
|
|
56
|
-
errors.forEach(e => console.log(
|
|
57
|
-
warnings.forEach(w => console.log(
|
|
56
|
+
errors.forEach(e => console.log(`${c.gray(S.branch)} ${c.red("ERROR: " + e)}`));
|
|
57
|
+
warnings.forEach(w => console.log(`${c.gray(S.branch)} ${c.yellow("WARN: " + w)}`));
|
|
58
58
|
}
|
|
59
59
|
|
|
60
60
|
totalErrors += errors.length;
|
|
@@ -62,7 +62,7 @@ export async function run(skillName) {
|
|
|
62
62
|
}
|
|
63
63
|
|
|
64
64
|
stepLine();
|
|
65
|
-
console.log(
|
|
65
|
+
console.log(`${c.gray(S.branch)} Total: ${skillsToValidate.length}, Errors: ${totalErrors}, Warnings: ${totalWarnings}`);
|
|
66
66
|
stepLine();
|
|
67
67
|
|
|
68
68
|
if (STRICT && totalErrors > 0) process.exit(1);
|
|
@@ -49,7 +49,7 @@ export async function run() {
|
|
|
49
49
|
}
|
|
50
50
|
|
|
51
51
|
stepLine();
|
|
52
|
-
console.log(
|
|
52
|
+
console.log(`${c.gray(S.branch)} ${issues ? c.red(issues + " issue(s)") : c.green("All verified")}`);
|
|
53
53
|
stepLine();
|
|
54
54
|
|
|
55
55
|
if (issues && STRICT) process.exit(1);
|
package/bin/lib/ui.js
CHANGED
|
@@ -80,14 +80,14 @@ export const c = {
|
|
|
80
80
|
*/
|
|
81
81
|
export function step(text, icon = S.diamond, color = "gray") {
|
|
82
82
|
const colorFn = c[color] || c.gray;
|
|
83
|
-
console.log(
|
|
83
|
+
console.log(`${c.gray(S.branch)} ${colorFn(icon)} ${text}`);
|
|
84
84
|
}
|
|
85
85
|
|
|
86
86
|
/**
|
|
87
87
|
* Print empty branch line
|
|
88
88
|
*/
|
|
89
89
|
export function stepLine() {
|
|
90
|
-
console.log(
|
|
90
|
+
console.log(`${c.gray(S.branch)}`);
|
|
91
91
|
}
|
|
92
92
|
|
|
93
93
|
/**
|
|
@@ -95,7 +95,7 @@ export function stepLine() {
|
|
|
95
95
|
* @param {string} msg - Error message
|
|
96
96
|
*/
|
|
97
97
|
export function fatal(msg) {
|
|
98
|
-
console.log(
|
|
98
|
+
console.log(`${c.gray(S.branch)} ${c.red(S.cross)} ${c.red(msg)}`);
|
|
99
99
|
process.exit(1);
|
|
100
100
|
}
|
|
101
101
|
|
|
@@ -104,7 +104,7 @@ export function fatal(msg) {
|
|
|
104
104
|
* @param {string} msg - Success message
|
|
105
105
|
*/
|
|
106
106
|
export function success(msg) {
|
|
107
|
-
console.log(
|
|
107
|
+
console.log(`${c.gray(S.branch)} ${c.green(S.check)} ${c.green(msg)}`);
|
|
108
108
|
}
|
|
109
109
|
|
|
110
110
|
/**
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "install-agent-skill",
|
|
3
|
-
"version": "1.3.
|
|
3
|
+
"version": "1.3.1",
|
|
4
4
|
"description": "Enterprise-grade Agent Skill Manager with Antigravity Skills support, Progressive Disclosure detection, and semantic routing validation",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"author": "DataGuruIn <contact@dataguruin.com>",
|