mirror of
https://github.com/stablyai/orca.git
synced 2026-10-08 16:02:37 +00:00
fix(skills): recognize symlinked provider skill roots (#22606)
This commit is contained in:
@@ -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(
|
||||
|
||||
@@ -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'
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user