agent-skills-standard 2.2.3 → 2.2.4
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/index.js +59 -27
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -3555,14 +3555,28 @@ var SkillSyncService = class {
|
|
|
3555
3555
|
* - none: Agent has no verified user-invoked command system — skip.
|
|
3556
3556
|
*/
|
|
3557
3557
|
var WorkflowTransformer = class {
|
|
3558
|
+
static parse(source) {
|
|
3559
|
+
const { description, body } = this.parseSource(source.content);
|
|
3560
|
+
return {
|
|
3561
|
+
key: source.name.replace(/\.md$/, ""),
|
|
3562
|
+
fileName: source.name,
|
|
3563
|
+
description,
|
|
3564
|
+
body,
|
|
3565
|
+
rawContent: source.content
|
|
3566
|
+
};
|
|
3567
|
+
}
|
|
3558
3568
|
static transform(source, format, workflowSourcePath = ".agents/workflows") {
|
|
3569
|
+
const parsed = this.parse(source);
|
|
3570
|
+
return this.transformParsed(parsed, format, workflowSourcePath);
|
|
3571
|
+
}
|
|
3572
|
+
static transformParsed(parsed, format, workflowSourcePath = ".agents/workflows") {
|
|
3559
3573
|
if (format === "none") return null;
|
|
3560
|
-
const { description, body } =
|
|
3561
|
-
const baseName =
|
|
3574
|
+
const { description, body } = parsed;
|
|
3575
|
+
const baseName = parsed.key;
|
|
3562
3576
|
switch (format) {
|
|
3563
3577
|
case "native": return {
|
|
3564
|
-
name:
|
|
3565
|
-
content:
|
|
3578
|
+
name: parsed.fileName,
|
|
3579
|
+
content: parsed.rawContent
|
|
3566
3580
|
};
|
|
3567
3581
|
case "command": return {
|
|
3568
3582
|
name: `${baseName}.md`,
|
|
@@ -3640,7 +3654,7 @@ Follow the exact steps in the workflow file.
|
|
|
3640
3654
|
* Agent Skill (SKILL.md) format.
|
|
3641
3655
|
* Used by Cursor, Trae, and Codex.
|
|
3642
3656
|
* Lives at <workflowPath>/<name>/SKILL.md
|
|
3643
|
-
*
|
|
3657
|
+
* Invoked through each platform's skill mechanism.
|
|
3644
3658
|
*/
|
|
3645
3659
|
static toSkillMarkdown(name, description, body) {
|
|
3646
3660
|
return `# ${name.split("-").map((w) => w.charAt(0).toUpperCase() + w.slice(1)).join(" ")} Skill
|
|
@@ -3740,11 +3754,13 @@ var WorkflowSyncService = class {
|
|
|
3740
3754
|
return [];
|
|
3741
3755
|
}
|
|
3742
3756
|
/**
|
|
3743
|
-
* Writes collected workflows to each active
|
|
3744
|
-
*
|
|
3745
|
-
* -
|
|
3746
|
-
* -
|
|
3747
|
-
* -
|
|
3757
|
+
* Writes collected workflows from `.agents/workflows/*.md` to each active
|
|
3758
|
+
* agent's native invocation surface.
|
|
3759
|
+
* - Antigravity/Kiro: keep native markdown workflows
|
|
3760
|
+
* - Claude/Roo/OpenCode: markdown command files
|
|
3761
|
+
* - Gemini: TOML command files
|
|
3762
|
+
* - Copilot: prompt files
|
|
3763
|
+
* - Cursor/Trae/Codex: skill folders with SKILL.md
|
|
3748
3764
|
*/
|
|
3749
3765
|
async writeWorkflows(workflows, config, agents) {
|
|
3750
3766
|
if (workflows.length === 0) return;
|
|
@@ -3755,16 +3771,17 @@ var WorkflowSyncService = class {
|
|
|
3755
3771
|
if (!agentDef || agentDef.workflowFormat === "none") continue;
|
|
3756
3772
|
const workflowDir = path.default.join(process.cwd(), agentDef.workflowPath);
|
|
3757
3773
|
await fs_extra.default.ensureDir(workflowDir);
|
|
3758
|
-
const
|
|
3759
|
-
const
|
|
3774
|
+
const sourceWorkflowDir = path.default.join(process.cwd(), ".agents/workflows");
|
|
3775
|
+
const workflowSourceRelative = path.default.relative(workflowDir, sourceWorkflowDir);
|
|
3760
3776
|
let written = 0;
|
|
3761
3777
|
for (const wf of workflows) {
|
|
3762
3778
|
if (wf.skill !== "workflows") continue;
|
|
3763
3779
|
for (const fileItem of wf.files) {
|
|
3764
|
-
const
|
|
3780
|
+
const parsed = WorkflowTransformer.parse({
|
|
3765
3781
|
name: fileItem.name,
|
|
3766
3782
|
content: fileItem.content
|
|
3767
|
-
}
|
|
3783
|
+
});
|
|
3784
|
+
const transformed = WorkflowTransformer.transformParsed(parsed, agentDef.workflowFormat, workflowSourceRelative);
|
|
3768
3785
|
if (!transformed) continue;
|
|
3769
3786
|
let targetFilePath;
|
|
3770
3787
|
if (agentDef.workflowFormat === "skill") {
|
|
@@ -4353,7 +4370,7 @@ var SyncCommand = class {
|
|
|
4353
4370
|
};
|
|
4354
4371
|
var package_default = {
|
|
4355
4372
|
name: "agent-skills-standard",
|
|
4356
|
-
version: "2.2.
|
|
4373
|
+
version: "2.2.4",
|
|
4357
4374
|
description: "A CLI to manage and sync AI agent skills standard for Cursor, Claude, Copilot, Windsurf, and more.",
|
|
4358
4375
|
main: "dist/index.js",
|
|
4359
4376
|
bin: {
|
|
@@ -4429,6 +4446,10 @@ var UpgradeCommand = class {
|
|
|
4429
4446
|
console.log(picocolors.default.red("❌ Could not determine latest version."));
|
|
4430
4447
|
return;
|
|
4431
4448
|
}
|
|
4449
|
+
if (!/^\d+\.\d+\.\d+(-[a-zA-Z0-9.]+)?(\+[a-zA-Z0-9.]+)?$/.test(latestVersion)) {
|
|
4450
|
+
console.log(picocolors.default.red(`❌ Invalid version received from npm: ${latestVersion}`));
|
|
4451
|
+
return;
|
|
4452
|
+
}
|
|
4432
4453
|
console.log(picocolors.default.gray(` Current version: ${currentVersion}`));
|
|
4433
4454
|
console.log(picocolors.default.gray(` Latest version: ${latestVersion}`));
|
|
4434
4455
|
if (currentVersion === latestVersion) {
|
|
@@ -4440,16 +4461,27 @@ var UpgradeCommand = class {
|
|
|
4440
4461
|
return;
|
|
4441
4462
|
}
|
|
4442
4463
|
const pm = this.detectPackageManager();
|
|
4443
|
-
const upgradeCmd = this.getUpgradeCommand(pm);
|
|
4464
|
+
const upgradeCmd = this.getUpgradeCommand(pm, latestVersion);
|
|
4444
4465
|
console.log(picocolors.default.yellow(`📦 Upgrading to v${latestVersion} using ${pm}...`));
|
|
4445
4466
|
try {
|
|
4446
4467
|
console.log(picocolors.default.gray(` Running: ${upgradeCmd}`));
|
|
4447
4468
|
(0, child_process.execSync)(upgradeCmd, { stdio: "inherit" });
|
|
4448
|
-
|
|
4469
|
+
try {
|
|
4470
|
+
const lines = (0, child_process.execSync)("ags -V", { encoding: "utf8" }).trim().split("\n");
|
|
4471
|
+
const installedVersion = lines[lines.length - 1].trim();
|
|
4472
|
+
if (installedVersion === latestVersion) console.log(picocolors.default.green(`✅ Successfully upgraded to v${latestVersion}!`));
|
|
4473
|
+
else {
|
|
4474
|
+
console.log("\n" + picocolors.default.yellow(`⚠️ Install finished, but 'ags -V' still reports v${installedVersion}.`));
|
|
4475
|
+
console.log(picocolors.default.gray(" This is likely due to package manager caching or a PATH conflict."));
|
|
4476
|
+
console.log(picocolors.default.cyan(`👉 Recommendation: Run '${picocolors.default.bold(upgradeCmd + " --force")}' manually.`));
|
|
4477
|
+
}
|
|
4478
|
+
} catch {
|
|
4479
|
+
console.log(picocolors.default.green(`✅ Install command completed.`));
|
|
4480
|
+
}
|
|
4449
4481
|
console.log(picocolors.default.cyan("Please restart your terminal if the version doesn't update immediately."));
|
|
4450
4482
|
} catch {
|
|
4451
4483
|
console.log("\n" + picocolors.default.red("❌ Automatic upgrade failed."));
|
|
4452
|
-
this.printManualInstructions(pm);
|
|
4484
|
+
this.printManualInstructions(pm, latestVersion);
|
|
4453
4485
|
}
|
|
4454
4486
|
}
|
|
4455
4487
|
detectPackageManager() {
|
|
@@ -4468,27 +4500,27 @@ var UpgradeCommand = class {
|
|
|
4468
4500
|
}
|
|
4469
4501
|
}
|
|
4470
4502
|
}
|
|
4471
|
-
getUpgradeCommand(pm) {
|
|
4503
|
+
getUpgradeCommand(pm, version) {
|
|
4472
4504
|
switch (pm) {
|
|
4473
|
-
case "pnpm": return
|
|
4474
|
-
case "yarn": return
|
|
4475
|
-
default: return
|
|
4505
|
+
case "pnpm": return `pnpm add -g agent-skills-standard@${version}`;
|
|
4506
|
+
case "yarn": return `yarn global add agent-skills-standard@${version}`;
|
|
4507
|
+
default: return `npm install -g agent-skills-standard@${version}`;
|
|
4476
4508
|
}
|
|
4477
4509
|
}
|
|
4478
|
-
printManualInstructions(pm) {
|
|
4510
|
+
printManualInstructions(pm, version) {
|
|
4479
4511
|
const sudoPrefix = process.platform === "win32" ? "" : "sudo ";
|
|
4480
4512
|
console.log(picocolors.default.yellow("Possible reasons:"));
|
|
4481
4513
|
console.log(picocolors.default.gray(" - Permission denied (requires sudo/administrator)"));
|
|
4482
4514
|
console.log(picocolors.default.gray(" - Network connectivity issues"));
|
|
4483
4515
|
console.log(picocolors.default.gray(` - ${pm} is not configured for global installs`));
|
|
4484
4516
|
console.log("\n" + picocolors.default.cyan("👉 Please run the following command manually:"));
|
|
4485
|
-
console.log(picocolors.default.white(picocolors.default.bold(` ${sudoPrefix}${this.getUpgradeCommand(pm)}`)));
|
|
4517
|
+
console.log(picocolors.default.white(picocolors.default.bold(` ${sudoPrefix}${this.getUpgradeCommand(pm, version)}`)));
|
|
4486
4518
|
if (pm !== "npm") {
|
|
4487
4519
|
console.log(picocolors.default.gray("\nAlternative (npm):"));
|
|
4488
|
-
console.log(picocolors.default.gray(` ${sudoPrefix}npm install -g agent-skills-standard
|
|
4520
|
+
console.log(picocolors.default.gray(` ${sudoPrefix}npm install -g agent-skills-standard@${version}`));
|
|
4489
4521
|
}
|
|
4490
4522
|
console.log(picocolors.default.gray("\nOr run via npx (no install required):"));
|
|
4491
|
-
console.log(picocolors.default.gray(` npx agent-skills-standard
|
|
4523
|
+
console.log(picocolors.default.gray(` npx agent-skills-standard@${version} sync`));
|
|
4492
4524
|
}
|
|
4493
4525
|
};
|
|
4494
4526
|
//#endregion
|
|
@@ -4820,7 +4852,7 @@ var ValidateCommand = class {
|
|
|
4820
4852
|
//#region src/index.ts
|
|
4821
4853
|
dotenv.default.config();
|
|
4822
4854
|
var program = new commander.Command();
|
|
4823
|
-
program.name("agent-skills-standard").description("A CLI to manage and sync AI agent skills for Cursor, Claude, Copilot, Windsurf, and more.").version("2.2.
|
|
4855
|
+
program.name("agent-skills-standard").description("A CLI to manage and sync AI agent skills for Cursor, Claude, Copilot, Windsurf, and more.").version("2.2.4");
|
|
4824
4856
|
program.command("init").description("Initialize a .skillsrc configuration file interactively").action(async () => {
|
|
4825
4857
|
await new InitCommand().run();
|
|
4826
4858
|
});
|