skills 1.1.1 → 1.1.2
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/dist/cli.js +45 -39
- package/package.json +1 -1
package/dist/cli.js
CHANGED
|
@@ -1167,7 +1167,7 @@ async function dismissPrompt(promptKey) {
|
|
|
1167
1167
|
// package.json
|
|
1168
1168
|
var package_default = {
|
|
1169
1169
|
name: "skills",
|
|
1170
|
-
version: "1.1.
|
|
1170
|
+
version: "1.1.2",
|
|
1171
1171
|
description: "The open agent skills ecosystem",
|
|
1172
1172
|
type: "module",
|
|
1173
1173
|
bin: {
|
|
@@ -1293,6 +1293,42 @@ function multiselect2(opts) {
|
|
|
1293
1293
|
message: `${opts.message} ${chalk.dim("(space to toggle)")}`
|
|
1294
1294
|
});
|
|
1295
1295
|
}
|
|
1296
|
+
async function selectAgentsInteractive(availableAgents, options) {
|
|
1297
|
+
const installChoice = await p.select({
|
|
1298
|
+
message: "Install to",
|
|
1299
|
+
options: [
|
|
1300
|
+
{
|
|
1301
|
+
value: "all",
|
|
1302
|
+
label: "All agents (Recommended)",
|
|
1303
|
+
hint: `Install to all ${availableAgents.length} detected agents`
|
|
1304
|
+
},
|
|
1305
|
+
{
|
|
1306
|
+
value: "select",
|
|
1307
|
+
label: "Select specific agents",
|
|
1308
|
+
hint: "Choose which agents to install to"
|
|
1309
|
+
}
|
|
1310
|
+
]
|
|
1311
|
+
});
|
|
1312
|
+
if (p.isCancel(installChoice)) {
|
|
1313
|
+
return installChoice;
|
|
1314
|
+
}
|
|
1315
|
+
if (installChoice === "all") {
|
|
1316
|
+
return availableAgents;
|
|
1317
|
+
}
|
|
1318
|
+
const agentChoices = availableAgents.map((a) => ({
|
|
1319
|
+
value: a,
|
|
1320
|
+
label: agents[a].displayName,
|
|
1321
|
+
hint: `${options.global ? agents[a].globalSkillsDir : agents[a].skillsDir}`
|
|
1322
|
+
}));
|
|
1323
|
+
const selected = await multiselect2({
|
|
1324
|
+
message: "Select agents to install skills to",
|
|
1325
|
+
options: agentChoices,
|
|
1326
|
+
required: true,
|
|
1327
|
+
initialValues: []
|
|
1328
|
+
// Start with none selected for easier picking
|
|
1329
|
+
});
|
|
1330
|
+
return selected;
|
|
1331
|
+
}
|
|
1296
1332
|
var version = package_default.version;
|
|
1297
1333
|
setVersion(version);
|
|
1298
1334
|
async function handleRemoteSkill(source, url, options, spinner2) {
|
|
@@ -1384,17 +1420,7 @@ async function handleRemoteSkill(source, url, options, spinner2) {
|
|
|
1384
1420
|
);
|
|
1385
1421
|
}
|
|
1386
1422
|
} else {
|
|
1387
|
-
const
|
|
1388
|
-
value: a,
|
|
1389
|
-
label: agents[a].displayName,
|
|
1390
|
-
hint: `${options.global ? agents[a].globalSkillsDir : agents[a].skillsDir}`
|
|
1391
|
-
}));
|
|
1392
|
-
const selected = await multiselect2({
|
|
1393
|
-
message: "Select agents to install skills to",
|
|
1394
|
-
options: agentChoices,
|
|
1395
|
-
required: true,
|
|
1396
|
-
initialValues: installedAgents
|
|
1397
|
-
});
|
|
1423
|
+
const selected = await selectAgentsInteractive(installedAgents, { global: options.global });
|
|
1398
1424
|
if (p.isCancel(selected)) {
|
|
1399
1425
|
p.cancel("Installation cancelled");
|
|
1400
1426
|
process.exit(0);
|
|
@@ -1656,17 +1682,7 @@ async function handleDirectUrlSkillLegacy(source, url, options, spinner2) {
|
|
|
1656
1682
|
);
|
|
1657
1683
|
}
|
|
1658
1684
|
} else {
|
|
1659
|
-
const
|
|
1660
|
-
value: a,
|
|
1661
|
-
label: agents[a].displayName,
|
|
1662
|
-
hint: `${options.global ? agents[a].globalSkillsDir : agents[a].skillsDir}`
|
|
1663
|
-
}));
|
|
1664
|
-
const selected = await multiselect2({
|
|
1665
|
-
message: "Select agents to install skills to",
|
|
1666
|
-
options: agentChoices,
|
|
1667
|
-
required: true,
|
|
1668
|
-
initialValues: installedAgents
|
|
1669
|
-
});
|
|
1685
|
+
const selected = await selectAgentsInteractive(installedAgents, { global: options.global });
|
|
1670
1686
|
if (p.isCancel(selected)) {
|
|
1671
1687
|
p.cancel("Installation cancelled");
|
|
1672
1688
|
process.exit(0);
|
|
@@ -1995,17 +2011,7 @@ async function runAdd(args, options = {}) {
|
|
|
1995
2011
|
);
|
|
1996
2012
|
}
|
|
1997
2013
|
} else {
|
|
1998
|
-
const
|
|
1999
|
-
value: a,
|
|
2000
|
-
label: agents[a].displayName,
|
|
2001
|
-
hint: `${options.global ? agents[a].globalSkillsDir : agents[a].skillsDir}`
|
|
2002
|
-
}));
|
|
2003
|
-
const selected = await multiselect2({
|
|
2004
|
-
message: "Select agents to install skills to",
|
|
2005
|
-
options: agentChoices,
|
|
2006
|
-
required: true,
|
|
2007
|
-
initialValues: installedAgents
|
|
2008
|
-
});
|
|
2014
|
+
const selected = await selectAgentsInteractive(installedAgents, { global: options.global });
|
|
2009
2015
|
if (p.isCancel(selected)) {
|
|
2010
2016
|
p.cancel("Installation cancelled");
|
|
2011
2017
|
await cleanup(tempDir);
|
|
@@ -2618,19 +2624,19 @@ function showBanner() {
|
|
|
2618
2624
|
console.log(`${DIM2}The open agent skills ecosystem${RESET2}`);
|
|
2619
2625
|
console.log();
|
|
2620
2626
|
console.log(
|
|
2621
|
-
` ${DIM2}$${RESET2} ${TEXT2}npx skills add ${DIM2}<package>${RESET2}
|
|
2627
|
+
` ${DIM2}$${RESET2} ${TEXT2}npx skills add ${DIM2}<package>${RESET2} ${DIM2}Install a skill${RESET2}`
|
|
2622
2628
|
);
|
|
2623
2629
|
console.log(
|
|
2624
|
-
` ${DIM2}$${RESET2} ${TEXT2}npx skills find ${DIM2}[query]${RESET2}
|
|
2630
|
+
` ${DIM2}$${RESET2} ${TEXT2}npx skills find ${DIM2}[query]${RESET2} ${DIM2}Search for skills${RESET2}`
|
|
2625
2631
|
);
|
|
2626
2632
|
console.log(
|
|
2627
|
-
` ${DIM2}$${RESET2} ${TEXT2}npx skills check${RESET2}
|
|
2633
|
+
` ${DIM2}$${RESET2} ${TEXT2}npx skills check${RESET2} ${DIM2}Check for updates${RESET2}`
|
|
2628
2634
|
);
|
|
2629
2635
|
console.log(
|
|
2630
|
-
` ${DIM2}$${RESET2} ${TEXT2}npx skills update${RESET2}
|
|
2636
|
+
` ${DIM2}$${RESET2} ${TEXT2}npx skills update${RESET2} ${DIM2}Update all skills${RESET2}`
|
|
2631
2637
|
);
|
|
2632
2638
|
console.log(
|
|
2633
|
-
` ${DIM2}$${RESET2} ${TEXT2}npx skills init ${DIM2}[name]${RESET2}
|
|
2639
|
+
` ${DIM2}$${RESET2} ${TEXT2}npx skills init ${DIM2}[name]${RESET2} ${DIM2}Create a new skill${RESET2}`
|
|
2634
2640
|
);
|
|
2635
2641
|
console.log();
|
|
2636
2642
|
console.log(`${DIM2}try:${RESET2} npx skills add vercel-labs/agent-skills`);
|