vskill 1.2.0 → 1.2.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 (59) hide show
  1. package/agents.json +1 -1
  2. package/dist/api/client.js +7 -6
  3. package/dist/api/client.js.map +1 -1
  4. package/dist/blocklist/blocklist.d.ts +12 -0
  5. package/dist/blocklist/blocklist.js +19 -0
  6. package/dist/blocklist/blocklist.js.map +1 -1
  7. package/dist/commands/add.js +71 -43
  8. package/dist/commands/add.js.map +1 -1
  9. package/dist/commands/auth.js +32 -1
  10. package/dist/commands/auth.js.map +1 -1
  11. package/dist/commands/diff.js +8 -0
  12. package/dist/commands/diff.js.map +1 -1
  13. package/dist/commands/info.js +7 -0
  14. package/dist/commands/info.js.map +1 -1
  15. package/dist/commands/outdated.js +24 -7
  16. package/dist/commands/outdated.js.map +1 -1
  17. package/dist/commands/pin.js +7 -2
  18. package/dist/commands/pin.js.map +1 -1
  19. package/dist/commands/submit.js +8 -0
  20. package/dist/commands/submit.js.map +1 -1
  21. package/dist/commands/update.js +14 -5
  22. package/dist/commands/update.js.map +1 -1
  23. package/dist/commands/versions.js +11 -0
  24. package/dist/commands/versions.js.map +1 -1
  25. package/dist/discovery/github-tree.js +14 -2
  26. package/dist/discovery/github-tree.js.map +1 -1
  27. package/dist/eval-server/api-routes.js +33 -2
  28. package/dist/eval-server/api-routes.js.map +1 -1
  29. package/dist/eval-server/install-skill-routes.d.ts +2 -0
  30. package/dist/eval-server/install-skill-routes.js +7 -0
  31. package/dist/eval-server/install-skill-routes.js.map +1 -1
  32. package/dist/eval-server/oauth-github-routes.js +25 -0
  33. package/dist/eval-server/oauth-github-routes.js.map +1 -1
  34. package/dist/eval-server/origin-resolver.d.ts +6 -0
  35. package/dist/eval-server/origin-resolver.js +35 -5
  36. package/dist/eval-server/origin-resolver.js.map +1 -1
  37. package/dist/eval-server/platform-proxy.d.ts +3 -3
  38. package/dist/eval-server/platform-proxy.js +10 -25
  39. package/dist/eval-server/platform-proxy.js.map +1 -1
  40. package/dist/eval-server/studio-privacy.d.ts +26 -0
  41. package/dist/eval-server/studio-privacy.js +129 -0
  42. package/dist/eval-server/studio-privacy.js.map +1 -0
  43. package/dist/eval-ui/assets/{CreateSkillPage-ENMve2K8.js → CreateSkillPage-DXOVLzCp.js} +1 -1
  44. package/dist/eval-ui/assets/{FindSkillsPalette-BMVKCk6E.js → FindSkillsPalette-D_qkIke-.js} +2 -2
  45. package/dist/eval-ui/assets/{SearchPaletteCore-C9G-ySXc.js → SearchPaletteCore-BbJxHT_o.js} +1 -1
  46. package/dist/eval-ui/assets/{SkillDetailPanel-BCJj8p79.js → SkillDetailPanel-DMkcBtBv.js} +1 -1
  47. package/dist/eval-ui/assets/{UpdateDropdown-C4BH7W_M.js → UpdateDropdown-CH05KQXq.js} +1 -1
  48. package/dist/eval-ui/assets/{main-tzMA8J07.js → main-DpG_H4H8.js} +5 -5
  49. package/dist/eval-ui/index.html +1 -1
  50. package/dist/lib/github-fetch.d.ts +2 -0
  51. package/dist/lib/github-fetch.js +27 -1
  52. package/dist/lib/github-fetch.js.map +1 -1
  53. package/dist/lib/private-source.d.ts +77 -0
  54. package/dist/lib/private-source.js +392 -0
  55. package/dist/lib/private-source.js.map +1 -0
  56. package/dist/lib/repo-visibility.d.ts +16 -0
  57. package/dist/lib/repo-visibility.js +43 -3
  58. package/dist/lib/repo-visibility.js.map +1 -1
  59. package/package.json +1 -1
@@ -12,6 +12,8 @@ import { classifyError } from "./error-classifier.js";
12
12
  import { readLockfile, writeLockfile } from "../lockfile/lockfile.js";
13
13
  import { resolveSkillApiName as resolveSkillApiNameImpl } from "./skill-name-resolver.js";
14
14
  import { resolveSkillOrigin } from "./origin-resolver.js";
15
+ import { isPrivateOrUnknownRepo } from "../lib/private-source.js";
16
+ import { isPrivateStudioSkill, isPrivateStudioSkillAt, readStudioLocks } from "./studio-privacy.js";
15
17
  import { runBenchmarkSSE, runSingleCaseSSE } from "./benchmark-runner.js";
16
18
  import { getSkillSemaphore } from "./concurrency.js";
17
19
  import { resolveSkillDir, resolveAllowedSkillDir } from "./skill-resolver.js";
@@ -1561,6 +1563,10 @@ export function registerRoutes(router, rootArg, projectName) {
1561
1563
  // overwrites currentVersion. Stamping it server-side from the lockfile
1562
1564
  // collapses the race so badges render their final source on first paint.
1563
1565
  const lockForCurrentVersion = readLockfile(root);
1566
+ // Skills from a private repo (or one GitHub does not confirm is public)
1567
+ // are flagged so the Studio never sends them to the platform; see
1568
+ // studio-privacy.ts for how installed, plugin and authored skills map.
1569
+ const studioLocks = readStudioLocks(root);
1564
1570
  const enriched = await Promise.all(skills.map(async (s) => {
1565
1571
  let evalCount = 0;
1566
1572
  let assertionCount = 0;
@@ -1583,9 +1589,11 @@ export function registerRoutes(router, rootArg, projectName) {
1583
1589
  // currentVersion=null — the resolver then falls through to frontmatter,
1584
1590
  // preserving non-italic styling for author-declared versions.
1585
1591
  const currentVersion = lockForCurrentVersion?.skills?.[s.skill]?.version ?? null;
1592
+ const sourcePrivate = await isPrivateStudioSkill({ ...s, origin }, studioLocks);
1586
1593
  return {
1587
1594
  ...s,
1588
1595
  origin,
1596
+ ...(sourcePrivate ? { sourcePrivate: true } : {}),
1589
1597
  scope: s.scope ?? (origin === "installed" ? "installed" : "own"),
1590
1598
  isSymlink: s.isSymlink ?? false,
1591
1599
  symlinkTarget: s.symlinkTarget ?? null,
@@ -1740,6 +1748,12 @@ export function registerRoutes(router, rootArg, projectName) {
1740
1748
  // `/versions/diff` as needed.
1741
1749
  async function buildSkillApiPath(skill, plugin) {
1742
1750
  const origin = await resolveSkillOrigin(skill, plugin, getRoot());
1751
+ // Private (or unconfirmed) skills never reach the platform: lockfile
1752
+ // entries (incl. plugin installs), authored skills in private checkouts,
1753
+ // and installed skills nobody recorded.
1754
+ if (origin.private || (await isPrivateStudioSkillAt(skill, plugin, getRoot()))) {
1755
+ return { apiPathRoot: null, origin };
1756
+ }
1743
1757
  if (origin.owner && origin.repo) {
1744
1758
  return {
1745
1759
  apiPathRoot: `/api/v1/skills/${encodeURIComponent(origin.owner)}/${encodeURIComponent(origin.repo)}/${encodeURIComponent(skill)}`,
@@ -1750,6 +1764,9 @@ export function registerRoutes(router, rootArg, projectName) {
1750
1764
  // whose origin comes from a git remote, not a lockfile.
1751
1765
  const fullName = await resolveSkillApiName(skill, plugin);
1752
1766
  const parts = fullName.split("/");
1767
+ if (parts.length === 3 && (await isPrivateOrUnknownRepo(parts[0], parts[1]))) {
1768
+ return { apiPathRoot: null, origin };
1769
+ }
1753
1770
  const apiPathRoot = parts.length === 3
1754
1771
  ? `/api/v1/skills/${parts.map(encodeURIComponent).join("/")}`
1755
1772
  : `/api/v1/skills/${encodeURIComponent(fullName)}`;
@@ -1759,7 +1776,6 @@ export function registerRoutes(router, rootArg, projectName) {
1759
1776
  const root = getRoot();
1760
1777
  // 0823: comprehensive origin resolver via shared buildSkillApiPath.
1761
1778
  const { apiPathRoot, origin } = await buildSkillApiPath(params.skill, params.plugin);
1762
- const apiPath = `${apiPathRoot}/versions`;
1763
1779
  const emptyEnvelope = () => {
1764
1780
  res.setHeader("X-Skill-VCS", "unavailable");
1765
1781
  sendJson(res, {
@@ -1770,6 +1786,13 @@ export function registerRoutes(router, rootArg, projectName) {
1770
1786
  trackedForUpdates: false,
1771
1787
  }, 200, req);
1772
1788
  };
1789
+ // A skill from a private (or unconfirmed) repo has no platform history,
1790
+ // and its name and repo must not be sent there.
1791
+ if (apiPathRoot === null) {
1792
+ emptyEnvelope();
1793
+ return;
1794
+ }
1795
+ const apiPath = `${apiPathRoot}/versions`;
1773
1796
  let fetchResp;
1774
1797
  try {
1775
1798
  fetchResp = await fetch(`${PLATFORM_BASE}${apiPath}`, {
@@ -1859,6 +1882,10 @@ export function registerRoutes(router, rootArg, projectName) {
1859
1882
  // so Anthropic-shipped skills (slack-messaging, pptx, etc.) get the
1860
1883
  // matching upstream URL for diff requests, not the legacy bare-name path.
1861
1884
  const { apiPathRoot } = await buildSkillApiPath(params.skill, params.plugin);
1885
+ if (apiPathRoot === null) {
1886
+ sendJson(res, { error: "This skill comes from a private repository; version diffs are not available from verified-skill.com." }, 404, req);
1887
+ return;
1888
+ }
1862
1889
  const basePath = `${apiPathRoot}/versions/diff`;
1863
1890
  try {
1864
1891
  const resp = await fetch(`${PLATFORM_BASE}${basePath}?from=${encodeURIComponent(from)}&to=${encodeURIComponent(to)}`, { signal: AbortSignal.timeout(10_000) });
@@ -1964,7 +1991,11 @@ export function registerRoutes(router, rootArg, projectName) {
1964
1991
  let versions = [];
1965
1992
  try {
1966
1993
  const origin = await resolveSkillOrigin(skill, plugin, root);
1967
- if (origin.owner && origin.repo) {
1994
+ // Private (or unconfirmed) skills never reach the platform.
1995
+ if (!origin.private &&
1996
+ origin.owner &&
1997
+ origin.repo &&
1998
+ !(await isPrivateStudioSkillAt(skill, plugin, root))) {
1968
1999
  const apiPath = `/api/v1/skills/${encodeURIComponent(origin.owner)}/${encodeURIComponent(origin.repo)}/${encodeURIComponent(skill)}/versions`;
1969
2000
  try {
1970
2001
  const fetchResp = await fetch(`${PLATFORM_BASE}${apiPath}`, {