Phase 14: build reinject blocks from tracked paths — loose skill disk fallback
buildReinjectBlocks uses tracked filePath/baseDir when resourceLoader has no entry and requireRegistered is false, completing defer-path B-002 injection. Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
+13
-6
@@ -179,11 +179,18 @@ export function buildReinjectBlocks(
|
||||
continue;
|
||||
}
|
||||
const registered = registeredByName.get(name);
|
||||
const filePath = registered?.filePath ?? tracked.filePath;
|
||||
const baseDir = registered?.baseDir ?? tracked.baseDir;
|
||||
if (!registered) {
|
||||
notifySkippedSkill(ctx, name, "no longer registered");
|
||||
continue;
|
||||
}
|
||||
if (!existsSync(registered.filePath)) {
|
||||
if (settings.requireRegistered) {
|
||||
notifySkippedSkill(ctx, name, "no longer registered");
|
||||
continue;
|
||||
}
|
||||
if (!existsSync(tracked.filePath)) {
|
||||
notifySkippedSkill(ctx, name, "SKILL.md not found on disk");
|
||||
continue;
|
||||
}
|
||||
} else if (!existsSync(filePath)) {
|
||||
notifySkippedSkill(ctx, name, "SKILL.md not found on disk");
|
||||
continue;
|
||||
}
|
||||
@@ -192,8 +199,8 @@ export function buildReinjectBlocks(
|
||||
expandSkill(
|
||||
{
|
||||
name: tracked.name,
|
||||
filePath: registered.filePath,
|
||||
baseDir: registered.baseDir,
|
||||
filePath,
|
||||
baseDir,
|
||||
},
|
||||
settings.suffix,
|
||||
),
|
||||
|
||||
Reference in New Issue
Block a user