Register MANIFEST paths.localSkills alongside pack _skills.

Parse packaging-generated paths and load each local_skills/*/SKILL.md with the same hasSkills toggles and provider as shared packs.

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
oliver 2026-09-15 08:23:05 +08:00
parent 6dee69be31
commit 53c47fbc6a
18 changed files with 662 additions and 156 deletions

View file

@ -31,6 +31,13 @@ export function asKbSnapshot(value: unknown): KbSnapshot {
content[key] = flag === true
}
}
const pathsRaw = row.paths
const paths: Record<string, string> = {}
if (pathsRaw !== null && typeof pathsRaw === 'object' && !Array.isArray(pathsRaw)) {
for (const [key, value] of Object.entries(pathsRaw as Record<string, unknown>)) {
if (typeof value === 'string' && value.trim()) paths[key] = value.trim()
}
}
return {
status,
realRoot: typeof row.realRoot === 'string' ? row.realRoot : '',
@ -38,6 +45,7 @@ export function asKbSnapshot(value: unknown): KbSnapshot {
country: typeof row.country === 'string' ? row.country : '',
version: typeof row.version === 'string' ? row.version : '',
content,
paths,
errorMessage: typeof row.errorMessage === 'string' ? row.errorMessage : '',
}
}