skills-atlas-cli 0.6.0 → 0.6.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.
Files changed (2) hide show
  1. package/package.json +1 -1
  2. package/src/format.js +11 -1
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "skills-atlas-cli",
3
- "version": "0.6.0",
3
+ "version": "0.6.1",
4
4
  "description": "Search, install and learn AI agent skills from the terminal — powered by the Skills Atlas catalog.",
5
5
  "bin": {
6
6
  "skills-atlas": "bin/skills.js",
package/src/format.js CHANGED
@@ -93,10 +93,20 @@ function groupOf(r, skillName, vendors) {
93
93
  };
94
94
  }
95
95
 
96
+ // Is this row backed by a private (registry) source? Private vendors are tagged
97
+ // `_private` by mergeCatalogs, so on a same-name clash the org's own version leads.
98
+ function isPrivateRow(r, vendors) {
99
+ return (r.sources || []).some(s => vendors[s.name] && vendors[s.name]._private);
100
+ }
101
+
96
102
  // Structured info for a skill (also the machine-readable --json shape). Groups
97
- // are ordered best-first so the most relevant one leads.
103
+ // are ordered best-first private (registry) groups first, then by stars — so the
104
+ // most relevant one leads (consistent with vendorsFor's install resolution).
98
105
  function buildInfo(skillName, { skillIndex, vendors }) {
99
106
  const rows = rowsFor(skillIndex, skillName).slice().sort((a, b) => {
107
+ const pa = isPrivateRow(a, vendors) ? 1 : 0;
108
+ const pb = isPrivateRow(b, vendors) ? 1 : 0;
109
+ if (pa !== pb) return pb - pa; // private (registry) groups first
100
110
  const A = rowRank(a), B = rowRank(b);
101
111
  return B.max - A.max || B.sum - A.sum || B.n - A.n;
102
112
  });