fix(installer): install type:agent skills to IDE native skills directory
The collectSkills scanner only recognized type:skill manifests, causing new-format agents (type:agent in bmad-skill-manifest.yaml) to be added to agent-manifest.csv but not installed to .claude/skills/. Now both type:skill and type:agent are recognized as installable skills, while collectAgents still processes type:agent dirs for the agent manifest even when claimed by the skill scanner. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
parent
d81ad38ace
commit
5a4d50a319
|
|
@ -176,7 +176,7 @@ class ManifestGenerator {
|
||||||
const skillFile = 'SKILL.md';
|
const skillFile = 'SKILL.md';
|
||||||
const artifactType = this.getArtifactType(manifest, skillFile);
|
const artifactType = this.getArtifactType(manifest, skillFile);
|
||||||
|
|
||||||
if (artifactType === 'skill') {
|
if (artifactType === 'skill' || artifactType === 'agent') {
|
||||||
const skillMdPath = path.join(dir, 'SKILL.md');
|
const skillMdPath = path.join(dir, 'SKILL.md');
|
||||||
const dirName = path.basename(dir);
|
const dirName = path.basename(dir);
|
||||||
|
|
||||||
|
|
@ -227,10 +227,10 @@ class ManifestGenerator {
|
||||||
if (manifest && !this.skillClaimedDirs.has(dir)) {
|
if (manifest && !this.skillClaimedDirs.has(dir)) {
|
||||||
let hasSkillType = false;
|
let hasSkillType = false;
|
||||||
if (manifest.__single) {
|
if (manifest.__single) {
|
||||||
hasSkillType = manifest.__single.type === 'skill';
|
hasSkillType = manifest.__single.type === 'skill' || manifest.__single.type === 'agent';
|
||||||
} else {
|
} else {
|
||||||
for (const key of Object.keys(manifest)) {
|
for (const key of Object.keys(manifest)) {
|
||||||
if (manifest[key]?.type === 'skill') {
|
if (manifest[key]?.type === 'skill' || manifest[key]?.type === 'agent') {
|
||||||
hasSkillType = true;
|
hasSkillType = true;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
@ -503,10 +503,9 @@ class ManifestGenerator {
|
||||||
const fullPath = path.join(dirPath, entry.name);
|
const fullPath = path.join(dirPath, entry.name);
|
||||||
|
|
||||||
if (entry.isDirectory()) {
|
if (entry.isDirectory()) {
|
||||||
// Skip directories claimed by collectSkills
|
|
||||||
if (this.skillClaimedDirs && this.skillClaimedDirs.has(fullPath)) continue;
|
|
||||||
|
|
||||||
// Check for new-format agent: bmad-skill-manifest.yaml with type: agent
|
// Check for new-format agent: bmad-skill-manifest.yaml with type: agent
|
||||||
|
// Note: type:agent dirs may also be claimed by collectSkills for IDE installation,
|
||||||
|
// but we still need to process them here for agent-manifest.csv
|
||||||
const dirManifest = await this.loadSkillManifest(fullPath);
|
const dirManifest = await this.loadSkillManifest(fullPath);
|
||||||
if (dirManifest && dirManifest.__single && dirManifest.__single.type === 'agent') {
|
if (dirManifest && dirManifest.__single && dirManifest.__single.type === 'agent') {
|
||||||
const m = dirManifest.__single;
|
const m = dirManifest.__single;
|
||||||
|
|
@ -540,6 +539,9 @@ class ManifestGenerator {
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Skip directories claimed by collectSkills (non-agent type skills)
|
||||||
|
if (this.skillClaimedDirs && this.skillClaimedDirs.has(fullPath)) continue;
|
||||||
|
|
||||||
// Recurse into subdirectories
|
// Recurse into subdirectories
|
||||||
const newRelativePath = relativePath ? `${relativePath}/${entry.name}` : entry.name;
|
const newRelativePath = relativePath ? `${relativePath}/${entry.name}` : entry.name;
|
||||||
const subDirAgents = await this.getAgentsFromDir(fullPath, moduleName, newRelativePath);
|
const subDirAgents = await this.getAgentsFromDir(fullPath, moduleName, newRelativePath);
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue