add-skill-kit 1.5.1 → 1.5.5
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/cli.js +1 -1
- package/bin/lib/commands/install.js +65 -18
- package/package.json +1 -1
package/bin/cli.js
CHANGED
|
@@ -12,7 +12,7 @@ import boxen from "boxen";
|
|
|
12
12
|
import { parseSkillSpec, merkleHash } from "../helpers.js";
|
|
13
13
|
import { parseSkillMdFrontmatter } from "../skills.js";
|
|
14
14
|
import { step, activeStep, stepLine, S, c, fatal, spinner, multiselect, select, confirm, isCancel, cancel } from "../ui.js";
|
|
15
|
-
import { WORKSPACE, GLOBAL_DIR, OFFLINE } from "../config.js";
|
|
15
|
+
import { WORKSPACE, GLOBAL_DIR, OFFLINE, GLOBAL } from "../config.js";
|
|
16
16
|
import { installSkill } from "../installer.js";
|
|
17
17
|
|
|
18
18
|
/**
|
|
@@ -207,6 +207,47 @@ export async function run(spec) {
|
|
|
207
207
|
step("Select skills to install");
|
|
208
208
|
console.log(`${c.gray(S.branch)} ${c.dim(selectedSkills.join(", "))}`);
|
|
209
209
|
|
|
210
|
+
// --- NEW: Scope Selection ---
|
|
211
|
+
|
|
212
|
+
// Determine installation scope
|
|
213
|
+
let isGlobal = false;
|
|
214
|
+
|
|
215
|
+
if (GLOBAL) {
|
|
216
|
+
isGlobal = true;
|
|
217
|
+
} else {
|
|
218
|
+
activeStep("Select installation scope");
|
|
219
|
+
|
|
220
|
+
const scopeSelection = await select({
|
|
221
|
+
message: " ",
|
|
222
|
+
options: [
|
|
223
|
+
{
|
|
224
|
+
label: "Current Project",
|
|
225
|
+
value: "local",
|
|
226
|
+
hint: "Installs to .agent/ (Best for project-specific skills)"
|
|
227
|
+
},
|
|
228
|
+
{
|
|
229
|
+
label: "Global System",
|
|
230
|
+
value: "global",
|
|
231
|
+
hint: "Installs to ~/.gemini/ (Available to all projects via 'agent' command)"
|
|
232
|
+
}
|
|
233
|
+
],
|
|
234
|
+
initialValue: "local"
|
|
235
|
+
});
|
|
236
|
+
|
|
237
|
+
if (isCancel(scopeSelection)) {
|
|
238
|
+
cancel("Cancelled.");
|
|
239
|
+
fs.rmSync(tmp, { recursive: true, force: true });
|
|
240
|
+
return;
|
|
241
|
+
}
|
|
242
|
+
|
|
243
|
+
isGlobal = scopeSelection === "global";
|
|
244
|
+
}
|
|
245
|
+
const targetScope = isGlobal ? GLOBAL_DIR : WORKSPACE;
|
|
246
|
+
|
|
247
|
+
stepLine();
|
|
248
|
+
step("Installation scope");
|
|
249
|
+
console.log(`${c.gray(S.branch)} ${c.dim(isGlobal ? "Global System" : "Current Project")}`);
|
|
250
|
+
|
|
210
251
|
// Agent selection - currently only Antigravity supported
|
|
211
252
|
const availableAgents = [
|
|
212
253
|
{ label: "Antigravity (.agent/skills)", value: "antigravity", available: true },
|
|
@@ -261,13 +302,6 @@ export async function run(spec) {
|
|
|
261
302
|
step("Select agents to install skills to");
|
|
262
303
|
console.log(`${c.gray(S.branch)} ${c.dim(Array.isArray(agents) ? agents.join(", ") : agents)}`);
|
|
263
304
|
|
|
264
|
-
const targetScope = WORKSPACE;
|
|
265
|
-
|
|
266
|
-
// Installation scope
|
|
267
|
-
stepLine();
|
|
268
|
-
step("Installation scope");
|
|
269
|
-
console.log(`${c.gray(S.branch)} ${c.dim("Project")}`);
|
|
270
|
-
|
|
271
305
|
// Installation method
|
|
272
306
|
activeStep("Installation method");
|
|
273
307
|
|
|
@@ -543,18 +577,31 @@ export async function run(spec) {
|
|
|
543
577
|
|
|
544
578
|
fs.rmSync(tmp, { recursive: true, force: true });
|
|
545
579
|
|
|
546
|
-
// Install CLI package
|
|
580
|
+
// Install CLI package
|
|
547
581
|
stepLine();
|
|
548
582
|
const cliSpinner = spinner();
|
|
549
|
-
|
|
550
|
-
|
|
551
|
-
|
|
552
|
-
|
|
553
|
-
|
|
554
|
-
|
|
555
|
-
|
|
556
|
-
|
|
557
|
-
|
|
583
|
+
const cliPackage = "@agentskillskit/cli";
|
|
584
|
+
|
|
585
|
+
if (isGlobal) {
|
|
586
|
+
cliSpinner.start(`Installing Agent CLI globally (${cliPackage})`);
|
|
587
|
+
try {
|
|
588
|
+
await execAsync(`npm install -g ${cliPackage}`, { timeout: 120000 });
|
|
589
|
+
cliSpinner.stop("Agent CLI installed globally");
|
|
590
|
+
step(c.dim("Run: agent"));
|
|
591
|
+
} catch (e) {
|
|
592
|
+
cliSpinner.stop(c.yellow("Global CLI installation failed"));
|
|
593
|
+
step(c.dim(`Try running manually: npm i -g ${cliPackage}`));
|
|
594
|
+
}
|
|
595
|
+
} else {
|
|
596
|
+
cliSpinner.start(`Installing Agent CLI locally (${cliPackage})`);
|
|
597
|
+
try {
|
|
598
|
+
await execAsync(`npm install -D ${cliPackage}`, { timeout: 120000 });
|
|
599
|
+
cliSpinner.stop("Agent CLI installed locally");
|
|
600
|
+
step(c.dim("Run: npx agent"));
|
|
601
|
+
} catch (e) {
|
|
602
|
+
cliSpinner.stop(c.yellow("Local CLI installation skipped"));
|
|
603
|
+
step(c.dim(`Run manually: npm i -D ${cliPackage}`));
|
|
604
|
+
}
|
|
558
605
|
}
|
|
559
606
|
|
|
560
607
|
stepLine();
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "add-skill-kit",
|
|
3
|
-
"version": "1.5.
|
|
3
|
+
"version": "1.5.5",
|
|
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": "agentskillkit <agentskillkit@gmail.com>",
|