diff --git a/src/main/skills/skill-freshness-inventory.test.ts b/src/main/skills/skill-freshness-inventory.test.ts index 7d160ba704b..475a581ab8c 100644 --- a/src/main/skills/skill-freshness-inventory.test.ts +++ b/src/main/skills/skill-freshness-inventory.test.ts @@ -252,6 +252,32 @@ describe('read-only skill freshness inventory', () => { expect(getSkillFreshnessDisplayStatus(inventory, 'orca-cli')).toBe('up-to-date') }) + it.runIf(process.platform !== 'win32')( + 'deduplicates a symlinked provider skills root', + async () => { + const test = await fixture() + const canonicalRoot = join(test.homeDir, '.agents', 'skills') + await test.writeSkill(canonicalRoot, test.currentMarkdown) + await mkdir(join(test.homeDir, '.claude'), { recursive: true }) + await symlink(canonicalRoot, join(test.homeDir, '.claude', 'skills')) + + const inventory = await inventorySkillFreshness({ + currentAppVersion: '2.0.0', + homeDir: test.homeDir, + repos: [], + resourceRoot: test.resourceRoot + }) + + expect(inventory.installations).toHaveLength(1) + expect(inventory.installations[0]).toMatchObject({ + topology: 'canonical-copy', + status: 'current', + providers: ['agent-skills', 'claude'] + }) + expect(getSkillFreshnessDisplayStatus(inventory, 'orca-cli')).toBe('up-to-date') + } + ) + it('reads up to date after the OS drops a sidecar into an untouched install', async () => { const test = await fixture() const directory = await test.writeSkill( diff --git a/src/main/skills/skill-installation-topology.ts b/src/main/skills/skill-installation-topology.ts index 0b6174120f0..3b86452148c 100644 --- a/src/main/skills/skill-installation-topology.ts +++ b/src/main/skills/skill-installation-topology.ts @@ -129,10 +129,8 @@ export async function classifyHomeSkillTopology( normalizedSkillIdentityPath(dirname(resolvedPath)) === normalizedSkillIdentityPath(canonicalRoot) let topology: SkillInstallationTopology - if (linked) { + if (linked || rootOrProviderParentLinked) { topology = isCanonicalTarget ? 'provider-alias' : 'external-link' - } else if (rootOrProviderParentLinked) { - topology = 'external-link' } else { topology = root.id === 'home-agents' ? 'canonical-copy' : 'independent-copy' }