refactor(installer): keep prototype resolution task-only and prototypeIds-only
This commit is contained in:
parent
25b6bfd58f
commit
cdffa0508c
|
|
@ -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)) {
|
||||
|
|
|
|||
|
|
@ -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);
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue