refactor(installer): keep prototype resolution task-only and prototypeIds-only

This commit is contained in:
Dicky Moore 2026-03-07 21:03:31 +00:00
parent 25b6bfd58f
commit cdffa0508c
2 changed files with 3 additions and 15 deletions

View File

@ -549,19 +549,8 @@ LOAD and execute from: {project-root}/{{bmadFolderName}}/{{path}}
* @returns {{dirPath: string, filename: string}|null}
*/
resolveArtifactSourceRef(artifact, bmadDir) {
let sourcePath = '';
if ((artifact.type === 'task' || artifact.type === 'tool') && artifact.path) {
sourcePath = artifact.path;
} else if (artifact.type === 'workflow-command' && artifact.workflowPath) {
sourcePath = artifact.workflowPath;
} else if (artifact.type === 'agent-launcher' && artifact.agentPath) {
sourcePath = artifact.agentPath;
} else if (typeof artifact.sourcePath === 'string') {
sourcePath = artifact.sourcePath;
}
if (!sourcePath) return null;
if (artifact.type !== 'task' || !artifact.path) return null;
const sourcePath = artifact.path;
let normalized = sourcePath.replaceAll('\\', '/');
if (path.isAbsolute(normalized)) {

View File

@ -46,8 +46,7 @@ function getPrototypeIds(manifest, filename) {
const manifestEntry = resolveManifestEntry(manifest, filename);
if (!manifestEntry) return [];
// Support one canonical field name plus temporary/fallback aliases during transition.
const rawIds = manifestEntry.prototypeIds ?? manifestEntry.skillPrototypeIds ?? manifestEntry.duplicateSkillIds ?? [];
const rawIds = manifestEntry.prototypeIds ?? [];
return normalizeIdList(rawIds);
}