agent-skills-standard 2.4.3 → 2.4.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/README.md CHANGED
@@ -5,13 +5,15 @@
5
5
 
6
6
  **Sync 242 AI coding standards to any project in one command.** Works with Cursor, Claude Code, GitHub Copilot, Gemini, Windsurf, Trae, Kiro, and Roo.
7
7
 
8
- **Current release:** `v2.4.3` — packaged `ags -V` now matches the published CLI version.
8
+ **Current release:** `v2.4.4` — packaged `ags -V` now matches the published CLI version.
9
9
 
10
10
  ```bash
11
11
  npx agent-skills-standard@latest init # detect your stack
12
12
  npx agent-skills-standard@latest sync # install skills
13
13
  ```
14
14
 
15
+ If `ags -V` still shows an old version after reinstalling, check your PATH order. `~/Library/pnpm` must come before `~/Library/pnpm/bin`, then run `hash -r` and verify with `ags -V` again.
16
+
15
17
  ---
16
18
 
17
19
  ## What It Does
package/dist/index.js CHANGED
@@ -4487,7 +4487,7 @@ var SyncCommand = class {
4487
4487
  };
4488
4488
  var package_default = {
4489
4489
  name: "agent-skills-standard",
4490
- version: "2.4.3",
4490
+ version: "2.4.4",
4491
4491
  description: "A CLI to manage and sync AI agent skills standard for Cursor, Claude, Copilot, Windsurf, and more.",
4492
4492
  main: "dist/index.js",
4493
4493
  bin: {
@@ -4588,7 +4588,31 @@ var UpgradeCommand = class {
4588
4588
  console.log(picocolors.default.yellow(`⚠️ Failed to install v${latestVersion}. Retrying with @latest...`));
4589
4589
  (0, child_process.execSync)(this.getUpgradeCommand(pm, "latest"), { stdio: "inherit" });
4590
4590
  }
4591
- try {
4591
+ if (pm === "pnpm") {
4592
+ const installedVersion = this.getInstalledVersionFromPnpm(latestVersion);
4593
+ if (installedVersion !== latestVersion) {
4594
+ console.log("\n" + picocolors.default.red(`❌ pnpm install completed, but the installed package still reports v${installedVersion ?? "unknown"}.`));
4595
+ console.log(picocolors.default.gray(" This means the global install itself is stale or incomplete, not just the shell shim."));
4596
+ this.printShellMismatchHint();
4597
+ return;
4598
+ }
4599
+ try {
4600
+ const lines = (0, child_process.execSync)("ags -V", {
4601
+ encoding: "utf8",
4602
+ stdio: "pipe"
4603
+ }).trim().split("\n");
4604
+ const shellVersion = lines[lines.length - 1].trim();
4605
+ if (shellVersion.includes(latestVersion)) console.log(picocolors.default.green(`✅ Successfully upgraded to v${latestVersion}!`));
4606
+ else {
4607
+ console.log("\n" + picocolors.default.yellow(`⚠️ pnpm installed v${latestVersion}, but 'ags -V' still reports v${shellVersion}.`));
4608
+ console.log(picocolors.default.gray(" Your shell is still resolving a stale shim or PATH entry."));
4609
+ this.printShellMismatchHint();
4610
+ }
4611
+ } catch {
4612
+ console.log(picocolors.default.green("\n✅ Upgrade command finished."));
4613
+ console.log(picocolors.default.gray(" (Installed version verified via pnpm; please check the shell command with 'ags -V')"));
4614
+ }
4615
+ } else try {
4592
4616
  const lines = (0, child_process.execSync)("ags -V", {
4593
4617
  encoding: "utf8",
4594
4618
  stdio: "pipe"
@@ -4596,9 +4620,14 @@ var UpgradeCommand = class {
4596
4620
  const installedVersion = lines[lines.length - 1].trim();
4597
4621
  if (installedVersion.includes(latestVersion)) console.log(picocolors.default.green(`✅ Successfully upgraded to v${latestVersion}!`));
4598
4622
  else {
4623
+ const resolvedBinary = (0, child_process.execSync)("type -a ags", {
4624
+ encoding: "utf8",
4625
+ stdio: "pipe"
4626
+ }).trim();
4599
4627
  console.log("\n" + picocolors.default.yellow(`⚠️ Installation complete, but 'ags -V' still reports v${installedVersion}.`));
4600
- console.log(picocolors.default.gray(" This is common if multiple versions are installed or your shell needs a restart."));
4601
- console.log(picocolors.default.cyan(`👉 Recommendation: Restart your terminal or run: ${picocolors.default.bold(this.getUpgradeCommand(pm, latestVersion) + " --force")}`));
4628
+ console.log(picocolors.default.gray(" This usually means your shell is still resolving a stale shim or PATH entry."));
4629
+ console.log(picocolors.default.gray(` Resolved binary:\n${resolvedBinary}`));
4630
+ console.log(picocolors.default.cyan(`👉 Recommendation: make sure ${picocolors.default.bold("~/Library/pnpm")} comes before ${picocolors.default.bold("~/Library/pnpm/bin")} in PATH, then run ${picocolors.default.bold("hash -r")} and recheck with 'ags -V'.`));
4602
4631
  }
4603
4632
  } catch {
4604
4633
  console.log(picocolors.default.green("\n✅ Upgrade command finished."));
@@ -4628,6 +4657,29 @@ var UpgradeCommand = class {
4628
4657
  default: return `npm install -g agent-skills-standard@${version}`;
4629
4658
  }
4630
4659
  }
4660
+ getInstalledVersionFromPnpm(version) {
4661
+ try {
4662
+ const globalRoot = (0, child_process.execSync)("pnpm root -g", {
4663
+ encoding: "utf8",
4664
+ stdio: "pipe"
4665
+ }).trim();
4666
+ const packageJsonPath = path.default.join(globalRoot, ".pnpm", `agent-skills-standard@${version}`, "node_modules", "agent-skills-standard", "package.json");
4667
+ return (0, child_process.execSync)(`node -p "require(${JSON.stringify(packageJsonPath)}).version"`, {
4668
+ encoding: "utf8",
4669
+ stdio: "pipe"
4670
+ }).trim() || null;
4671
+ } catch {
4672
+ return null;
4673
+ }
4674
+ }
4675
+ printShellMismatchHint() {
4676
+ const resolvedBinary = (0, child_process.execSync)("type -a ags", {
4677
+ encoding: "utf8",
4678
+ stdio: "pipe"
4679
+ }).trim();
4680
+ console.log(picocolors.default.gray(` Resolved binary:\n${resolvedBinary}`));
4681
+ console.log(picocolors.default.cyan(`👉 Recommendation: make sure ${picocolors.default.bold("~/Library/pnpm")} comes before ${picocolors.default.bold("~/Library/pnpm/bin")} in PATH, then run ${picocolors.default.bold("hash -r")} and recheck with 'ags -V'.`));
4682
+ }
4631
4683
  printManualInstructions(pm, version) {
4632
4684
  const sudoPrefix = process.platform === "win32" ? "" : "sudo ";
4633
4685
  console.log(picocolors.default.yellow("Possible reasons:"));
@@ -4973,7 +5025,7 @@ var ValidateCommand = class {
4973
5025
  //#region src/index.ts
4974
5026
  dotenv.default.config();
4975
5027
  var program = new commander.Command();
4976
- program.name("agent-skills-standard").description("A CLI to manage and sync AI agent skills for Cursor, Claude, Copilot, Windsurf, and more.").version("2.4.3");
5028
+ program.name("agent-skills-standard").description("A CLI to manage and sync AI agent skills for Cursor, Claude, Copilot, Windsurf, and more.").version("2.4.4");
4977
5029
  program.command("init").description("Initialize a .skillsrc configuration file interactively").action(async () => {
4978
5030
  await new InitCommand().run();
4979
5031
  });