From b46797f4ba85b92c66f7e90fa5bca29969f48b55 Mon Sep 17 00:00:00 2001 From: Dotta Date: Thu, 11 Jun 2026 16:32:28 +0000 Subject: [PATCH] Fix skills store PR verification failures --- .../shared/src/validators/company-skill.test.ts | 14 ++++++++++++++ server/src/services/company-portability.ts | 8 +++++++- server/src/services/company-skills.ts | 7 ++++++- 3 files changed, 27 insertions(+), 2 deletions(-) diff --git a/packages/shared/src/validators/company-skill.test.ts b/packages/shared/src/validators/company-skill.test.ts index 20965e63b0c..ec28e5f9331 100644 --- a/packages/shared/src/validators/company-skill.test.ts +++ b/packages/shared/src/validators/company-skill.test.ts @@ -54,6 +54,20 @@ const companySkill = { trustLevel: "markdown_only", compatibility: "compatible", fileInventory: [{ path: "SKILL.md", kind: "skill" }], + iconUrl: null, + color: null, + tagline: null, + authorName: null, + homepageUrl: null, + categories: [], + sharingScope: "private", + publicShareToken: null, + forkedFromSkillId: null, + forkedFromCompanyId: null, + starCount: 0, + installCount: 1, + forkCount: 0, + currentVersionId: null, metadata: { sourceKind: "catalog", catalogId: catalogSkill.id, diff --git a/server/src/services/company-portability.ts b/server/src/services/company-portability.ts index e696063445c..1024a871b74 100644 --- a/server/src/services/company-portability.ts +++ b/server/src/services/company-portability.ts @@ -2770,13 +2770,19 @@ function buildManifestFromPackageFiles( const trackingRef = asString(primarySource?.trackingRef); const sourceHostname = asString(primarySource?.hostname) || "github.com"; const [owner, repoName] = (repo ?? "").split("/"); + const canonicalKey = readSkillKey(frontmatter); + const normalizedSourceKind = owner === "paperclipai" + && repoName === "paperclip" + && canonicalKey?.startsWith("paperclipai/paperclip/") + ? "paperclip_bundled" + : "github"; sourceType = "github"; sourceLocator = asString(primarySource?.url) ?? (repo ? `https://${sourceHostname}/${repo}${repoPath ? `/tree/${trackingRef ?? commit ?? "main"}/${repoPath}` : ""}` : null); sourceRef = commit; normalizedMetadata = owner && repoName ? { - sourceKind: "github", + sourceKind: normalizedSourceKind, ...(sourceHostname !== "github.com" ? { hostname: sourceHostname } : {}), owner, repo: repoName, diff --git a/server/src/services/company-skills.ts b/server/src/services/company-skills.ts index 3df874749df..cc645c8437a 100644 --- a/server/src/services/company-skills.ts +++ b/server/src/services/company-skills.ts @@ -910,13 +910,18 @@ function deriveImportedSkillSource( : null); const [owner, repoName] = (repo ?? "").split("/"); if (repo && owner && repoName) { + const sourceKind = owner === "paperclipai" + && repoName === "paperclip" + && canonicalKey?.startsWith("paperclipai/paperclip/") + ? "paperclip_bundled" + : "github"; return { sourceType: "github", sourceLocator: url, sourceRef: commit, metadata: { ...(canonicalKey ? { skillKey: canonicalKey } : {}), - sourceKind: "github", + sourceKind, ...(sourceHostname !== "github.com" ? { hostname: sourceHostname } : {}), owner, repo: repoName,