Simplify agent configurations and fix team bundle builds
Major refactoring to streamline agent configuration structure and improve build reliability: Agent Configuration Simplification: - Remove environment sections from all agent YAML files - Add single 'persona' property to agent configs pointing to persona file - All agents now use consistent, simplified structure without web/ide environment splits - Fix dev agent to be available for web environment (was causing team-dev bundle build failure) Build System Updates: - Update dependency-resolver.js to use new persona property instead of environments.web.persona_file - Update bundle-optimizer.js to load personas using agent's persona property - Remove environment availability checks since all agents are now web-compatible - Change output directory from dist/web/bundles/ to dist/web/teams/ for clarity File Organization: - Move IDE-specific personas (dev.ide.md, devops-pe.ide.md, sm.ide.md) to bmad-core/ide-agents/ - Rename team bundles for clarity: - team-full.yml → team-full-app.yml (web application teams) - team-planning.yml → team-small-service.yml (backend service teams) - Remove team-full-ide.yml (IDE teams will be handled separately) This change ensures all 3 web team bundles build successfully and simplifies future agent maintenance. 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
parent
f91f49a6d9
commit
e3ed97a690
|
|
@ -1,11 +1,10 @@
|
||||||
# Analyst Agent Configuration
|
|
||||||
|
|
||||||
agent:
|
agent:
|
||||||
name: Mary
|
name: Mary
|
||||||
id: analyst
|
id: analyst
|
||||||
version: 1.0.0
|
version: 1.0.0
|
||||||
title: Analyst
|
title: Analyst
|
||||||
description: Project Analyst and Brainstorming Coach
|
description: Project Analyst and Brainstorming Coach
|
||||||
|
persona: analyst
|
||||||
customize: >-
|
customize: >-
|
||||||
You are a bit of a know-it-all, and like to verbalize and emote as if you were a physical
|
You are a bit of a know-it-all, and like to verbalize and emote as if you were a physical
|
||||||
person.
|
person.
|
||||||
|
|
@ -17,10 +16,3 @@ dependencies:
|
||||||
- project-brief-tmpl
|
- project-brief-tmpl
|
||||||
checklists: []
|
checklists: []
|
||||||
data: []
|
data: []
|
||||||
environments:
|
|
||||||
ide:
|
|
||||||
persona_file: analyst
|
|
||||||
command_prefix: '*'
|
|
||||||
web:
|
|
||||||
persona_file: analyst
|
|
||||||
command_prefix: /
|
|
||||||
|
|
|
||||||
|
|
@ -1,12 +1,11 @@
|
||||||
# Architect Agent Configuration
|
|
||||||
|
|
||||||
agent:
|
agent:
|
||||||
name: Fred
|
name: Fred
|
||||||
id: architect
|
id: architect
|
||||||
version: 1.0.0
|
version: 1.0.0
|
||||||
title: Architect
|
title: Architect
|
||||||
description: For system architecture, technical design, architecture checklists.
|
description: For system architecture, technical design, architecture checklists.
|
||||||
customize: ''
|
persona: architect
|
||||||
|
customize: ""
|
||||||
dependencies:
|
dependencies:
|
||||||
tasks:
|
tasks:
|
||||||
- create-architecture
|
- create-architecture
|
||||||
|
|
@ -21,10 +20,3 @@ dependencies:
|
||||||
- architect-checklist
|
- architect-checklist
|
||||||
data:
|
data:
|
||||||
- technical-preferences
|
- technical-preferences
|
||||||
environments:
|
|
||||||
ide:
|
|
||||||
persona_file: architect
|
|
||||||
command_prefix: '*'
|
|
||||||
web:
|
|
||||||
persona_file: architect
|
|
||||||
command_prefix: /
|
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,4 @@
|
||||||
# BMAD Agent Configuration
|
# BMAD Agent Configuration
|
||||||
# ONLY agent with bmad-kb access
|
|
||||||
|
|
||||||
agent:
|
agent:
|
||||||
name: BMAD
|
name: BMAD
|
||||||
|
|
@ -7,6 +6,7 @@ agent:
|
||||||
version: 1.0.0
|
version: 1.0.0
|
||||||
title: BMAD
|
title: BMAD
|
||||||
description: For general BMAD Method or Agent queries, oversight, or advice and guidance when unsure.
|
description: For general BMAD Method or Agent queries, oversight, or advice and guidance when unsure.
|
||||||
|
persona: bmad
|
||||||
customize: >-
|
customize: >-
|
||||||
Helpful, hand holding level guidance when needed. Loves the BMad Method and will help you
|
Helpful, hand holding level guidance when needed. Loves the BMad Method and will help you
|
||||||
customize and use it to your needs, which also orchestrating and ensuring the agents he becomes
|
customize and use it to your needs, which also orchestrating and ensuring the agents he becomes
|
||||||
|
|
@ -19,10 +19,3 @@ dependencies:
|
||||||
- bmad-kb
|
- bmad-kb
|
||||||
utils:
|
utils:
|
||||||
- orchestrator-commands
|
- orchestrator-commands
|
||||||
environments:
|
|
||||||
ide:
|
|
||||||
persona_file: bmad
|
|
||||||
command_prefix: '*'
|
|
||||||
web:
|
|
||||||
persona_file: bmad
|
|
||||||
command_prefix: /
|
|
||||||
|
|
|
||||||
|
|
@ -1,12 +1,11 @@
|
||||||
# Design Architect Agent Configuration
|
|
||||||
|
|
||||||
agent:
|
agent:
|
||||||
name: Jane
|
name: Jane
|
||||||
id: design-architect
|
id: design-architect
|
||||||
version: 1.0.0
|
version: 1.0.0
|
||||||
title: Design Architect
|
title: Design Architect
|
||||||
description: For UI/UX specifications, front-end architecture, and UI 1-shot prompting.
|
description: For UI/UX specifications, front-end architecture, and UI 1-shot prompting.
|
||||||
customize: ''
|
persona: design-architect
|
||||||
|
customize: ""
|
||||||
dependencies:
|
dependencies:
|
||||||
tasks:
|
tasks:
|
||||||
- create-frontend-architecture
|
- create-frontend-architecture
|
||||||
|
|
@ -19,10 +18,3 @@ dependencies:
|
||||||
- frontend-architecture-checklist
|
- frontend-architecture-checklist
|
||||||
data:
|
data:
|
||||||
- technical-preferences
|
- technical-preferences
|
||||||
environments:
|
|
||||||
ide:
|
|
||||||
persona_file: design-architect
|
|
||||||
command_prefix: '*'
|
|
||||||
web:
|
|
||||||
persona_file: design-architect
|
|
||||||
command_prefix: /
|
|
||||||
|
|
|
||||||
|
|
@ -1,12 +1,11 @@
|
||||||
# Full Stack Dev Agent Configuration
|
|
||||||
|
|
||||||
agent:
|
agent:
|
||||||
name: James
|
name: James
|
||||||
id: dev
|
id: dev
|
||||||
version: 1.0.0
|
version: 1.0.0
|
||||||
title: Full Stack Dev
|
title: Full Stack Dev
|
||||||
description: Master Generalist Expert Senior Senior Full Stack Developer
|
description: Master Generalist Expert Senior Senior Full Stack Developer
|
||||||
customize: ''
|
persona: dev
|
||||||
|
customize: ""
|
||||||
dependencies:
|
dependencies:
|
||||||
tasks: []
|
tasks: []
|
||||||
templates: []
|
templates: []
|
||||||
|
|
@ -14,13 +13,3 @@ dependencies:
|
||||||
- story-dod-checklist
|
- story-dod-checklist
|
||||||
data:
|
data:
|
||||||
- technical-preferences
|
- technical-preferences
|
||||||
environments:
|
|
||||||
ide:
|
|
||||||
persona_file: dev.ide.md
|
|
||||||
command_prefix: '*'
|
|
||||||
supports_file_operations: true
|
|
||||||
ide_only: true
|
|
||||||
web:
|
|
||||||
persona_file: dev
|
|
||||||
command_prefix: /
|
|
||||||
available: false
|
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,3 @@
|
||||||
# Platform Engineer Agent Configuration
|
|
||||||
|
|
||||||
agent:
|
agent:
|
||||||
name: Alex
|
name: Alex
|
||||||
id: devops
|
id: devops
|
||||||
|
|
@ -10,6 +8,7 @@ agent:
|
||||||
have the production environment as resilient and reliable for the customer as possible. He is a
|
have the production environment as resilient and reliable for the customer as possible. He is a
|
||||||
Master Expert Senior Platform Engineer with 15+ years of experience in DevSecOps, Cloud
|
Master Expert Senior Platform Engineer with 15+ years of experience in DevSecOps, Cloud
|
||||||
Engineering, and Platform Engineering with a deep, profound knowledge of SRE.
|
Engineering, and Platform Engineering with a deep, profound knowledge of SRE.
|
||||||
|
persona: devops
|
||||||
customize: >-
|
customize: >-
|
||||||
Specialized in cloud-native system architectures and tools, like Kubernetes, Docker, GitHub
|
Specialized in cloud-native system architectures and tools, like Kubernetes, Docker, GitHub
|
||||||
Actions, CI/CD pipelines, and infrastructure-as-code practices (e.g., Terraform, CloudFormation,
|
Actions, CI/CD pipelines, and infrastructure-as-code practices (e.g., Terraform, CloudFormation,
|
||||||
|
|
@ -25,13 +24,3 @@ dependencies:
|
||||||
- infrastructure-checklist
|
- infrastructure-checklist
|
||||||
data:
|
data:
|
||||||
- technical-preferences
|
- technical-preferences
|
||||||
environments:
|
|
||||||
ide:
|
|
||||||
persona_file: devops-pe.ide
|
|
||||||
command_prefix: '*'
|
|
||||||
supports_file_operations: true
|
|
||||||
ide_only: true
|
|
||||||
web:
|
|
||||||
persona_file: devops
|
|
||||||
command_prefix: /
|
|
||||||
available: false
|
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,3 @@
|
||||||
# Product Manager Agent Configuration
|
|
||||||
|
|
||||||
agent:
|
agent:
|
||||||
name: John
|
name: John
|
||||||
id: pm
|
id: pm
|
||||||
|
|
@ -8,7 +6,8 @@ agent:
|
||||||
description: >-
|
description: >-
|
||||||
Main goal is to help produce or maintain the best possible PRD and represent the end user the
|
Main goal is to help produce or maintain the best possible PRD and represent the end user the
|
||||||
product will serve.
|
product will serve.
|
||||||
customize: ''
|
persona: pm
|
||||||
|
customize: ""
|
||||||
dependencies:
|
dependencies:
|
||||||
tasks:
|
tasks:
|
||||||
- create-doc-from-template
|
- create-doc-from-template
|
||||||
|
|
@ -21,10 +20,3 @@ dependencies:
|
||||||
- change-checklist
|
- change-checklist
|
||||||
data:
|
data:
|
||||||
- technical-preferences
|
- technical-preferences
|
||||||
environments:
|
|
||||||
ide:
|
|
||||||
persona_file: pm
|
|
||||||
command_prefix: '*'
|
|
||||||
web:
|
|
||||||
persona_file: pm
|
|
||||||
command_prefix: /
|
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,3 @@
|
||||||
# PO Agent Configuration
|
|
||||||
|
|
||||||
agent:
|
agent:
|
||||||
name: Sarah
|
name: Sarah
|
||||||
id: po
|
id: po
|
||||||
|
|
@ -8,7 +6,8 @@ agent:
|
||||||
description: >-
|
description: >-
|
||||||
Product Owner helps validate the artifacts are all cohesive with a master checklist, and also
|
Product Owner helps validate the artifacts are all cohesive with a master checklist, and also
|
||||||
helps coach significant changes
|
helps coach significant changes
|
||||||
customize: ''
|
persona: po
|
||||||
|
customize: ""
|
||||||
dependencies:
|
dependencies:
|
||||||
tasks:
|
tasks:
|
||||||
- checklist-run-task
|
- checklist-run-task
|
||||||
|
|
@ -20,10 +19,3 @@ dependencies:
|
||||||
- po-master-checklist
|
- po-master-checklist
|
||||||
- change-checklist
|
- change-checklist
|
||||||
data: []
|
data: []
|
||||||
environments:
|
|
||||||
ide:
|
|
||||||
persona_file: po
|
|
||||||
command_prefix: '*'
|
|
||||||
web:
|
|
||||||
persona_file: po
|
|
||||||
command_prefix: /
|
|
||||||
|
|
|
||||||
|
|
@ -1,12 +1,11 @@
|
||||||
# SM Agent Configuration
|
|
||||||
|
|
||||||
agent:
|
agent:
|
||||||
name: Bob
|
name: Bob
|
||||||
id: sm
|
id: sm
|
||||||
version: 1.0.0
|
version: 1.0.0
|
||||||
title: SM
|
title: SM
|
||||||
description: A very Technical Scrum Master helps the team run the Scrum process.
|
description: A very Technical Scrum Master helps the team run the Scrum process.
|
||||||
customize: ''
|
persona: sm
|
||||||
|
customize: ""
|
||||||
dependencies:
|
dependencies:
|
||||||
tasks:
|
tasks:
|
||||||
- create-next-story-task
|
- create-next-story-task
|
||||||
|
|
@ -15,11 +14,3 @@ dependencies:
|
||||||
checklists:
|
checklists:
|
||||||
- story-draft-checklist
|
- story-draft-checklist
|
||||||
data: []
|
data: []
|
||||||
environments:
|
|
||||||
ide:
|
|
||||||
persona_file: sm
|
|
||||||
command_prefix: '*'
|
|
||||||
has_specialized_version: true
|
|
||||||
web:
|
|
||||||
persona_file: sm
|
|
||||||
command_prefix: /
|
|
||||||
|
|
|
||||||
|
|
@ -1,11 +1,10 @@
|
||||||
# Development Team Bundle
|
|
||||||
|
|
||||||
bundle:
|
bundle:
|
||||||
name: Development Team Bundle
|
name: Development Team Bundle
|
||||||
filename: team-dev-bundle.txt
|
filename: team-dev.txt
|
||||||
target_environment: web
|
target_environment: web
|
||||||
|
|
||||||
agents:
|
agents:
|
||||||
- bmad
|
- bmad
|
||||||
- po
|
- po
|
||||||
- sm
|
- sm
|
||||||
|
- dev
|
||||||
|
|
|
||||||
|
|
@ -1,8 +1,6 @@
|
||||||
# Full Team Bundle
|
|
||||||
|
|
||||||
bundle:
|
bundle:
|
||||||
name: Full Team Bundle
|
name: Full Team Bundle
|
||||||
filename: team-full-bundle.txt
|
filename: team-full.txt
|
||||||
target_environment: web
|
target_environment: web
|
||||||
|
|
||||||
agents:
|
agents:
|
||||||
|
|
@ -1,17 +0,0 @@
|
||||||
# Full IDE Team Bundle
|
|
||||||
|
|
||||||
bundle:
|
|
||||||
name: Full IDE Team Bundle
|
|
||||||
filename: team-full-ide
|
|
||||||
target_environment: ide
|
|
||||||
|
|
||||||
agents:
|
|
||||||
- bmad
|
|
||||||
- analyst
|
|
||||||
- pm
|
|
||||||
- architect
|
|
||||||
- design-architect
|
|
||||||
- po
|
|
||||||
- sm
|
|
||||||
- dev
|
|
||||||
- devops
|
|
||||||
|
|
@ -1,8 +1,6 @@
|
||||||
# Planning Team Bundle
|
|
||||||
|
|
||||||
bundle:
|
bundle:
|
||||||
name: Planning Team Bundle
|
name: Planning Team Bundle
|
||||||
filename: team-planning-bundle.txt
|
filename: team-backend-planning.txt
|
||||||
target_environment: web
|
target_environment: web
|
||||||
|
|
||||||
agents:
|
agents:
|
||||||
|
|
@ -1,12 +1,3 @@
|
||||||
# User-Defined Preferred Patterns and Preferences
|
# User-Defined Preferred Patterns and Preferences
|
||||||
|
|
||||||
List out your preferred:
|
None Listed
|
||||||
- technical preferences
|
|
||||||
- design patterns
|
|
||||||
- languages
|
|
||||||
- framework
|
|
||||||
- etc...
|
|
||||||
|
|
||||||
Anything you learn or prefer over time to drive future project choices, add them here.
|
|
||||||
|
|
||||||
These will be used by the agents when producing PRD and Architectures
|
|
||||||
|
|
|
||||||
|
|
@ -18,6 +18,7 @@ When these commands are used, perform the listed action:
|
||||||
## Agent-Specific Commands
|
## Agent-Specific Commands
|
||||||
|
|
||||||
The `/{agent}` command switches to any agent included in the bundle. The command accepts either:
|
The `/{agent}` command switches to any agent included in the bundle. The command accepts either:
|
||||||
|
|
||||||
- The agent's role identifier (e.g., `/pm`, `/architect`, `/dev`)
|
- The agent's role identifier (e.g., `/pm`, `/architect`, `/dev`)
|
||||||
- The agent's configured name (e.g., `/john` if PM is named John, `/fred` if Architect is named Fred)
|
- The agent's configured name (e.g., `/john` if PM is named John, `/fred` if Architect is named Fred)
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -118,14 +118,14 @@ class WebBuilder {
|
||||||
}
|
}
|
||||||
|
|
||||||
// Write output files
|
// Write output files
|
||||||
const outputDir = path.join(this.outputPath, 'bundles');
|
const outputDir = path.join(this.outputPath, 'teams');
|
||||||
this.ensureDirectory(outputDir);
|
this.ensureDirectory(outputDir);
|
||||||
|
|
||||||
const outputs = [];
|
const outputs = [];
|
||||||
|
|
||||||
// Default to single_file format if not specified
|
// Default to single_file format if not specified
|
||||||
const outputFormat = bundleConfig.output?.format || 'single_file';
|
const outputFormat = bundleConfig.output?.format || 'single_file';
|
||||||
const outputFilename = bundleConfig.output?.filename || bundleConfig.filename || `${bundleConfig.name.toLowerCase().replace(/\s+/g, '-')}-bundle.txt`;
|
const outputFilename = bundleConfig.output?.filename || bundleConfig.filename || `${bundleConfig.name.toLowerCase().replace(/\s+/g, '-')}.txt`;
|
||||||
|
|
||||||
if (outputFormat === 'single_file') {
|
if (outputFormat === 'single_file') {
|
||||||
// Create single bundle file
|
// Create single bundle file
|
||||||
|
|
@ -160,7 +160,7 @@ class WebBuilder {
|
||||||
const outputDir = path.join(this.outputPath, 'agents');
|
const outputDir = path.join(this.outputPath, 'agents');
|
||||||
this.ensureDirectory(outputDir);
|
this.ensureDirectory(outputDir);
|
||||||
|
|
||||||
const agentFile = path.join(outputDir, `${agentId}-agent-bundle.txt`);
|
const agentFile = path.join(outputDir, `${agentId}.txt`);
|
||||||
fs.writeFileSync(agentFile, optimizedBundle.standaloneContent);
|
fs.writeFileSync(agentFile, optimizedBundle.standaloneContent);
|
||||||
|
|
||||||
return {
|
return {
|
||||||
|
|
@ -208,7 +208,7 @@ class WebBuilder {
|
||||||
*/
|
*/
|
||||||
createOrchestratorFiles(bundle, config) {
|
createOrchestratorFiles(bundle, config) {
|
||||||
const files = [];
|
const files = [];
|
||||||
const outputDir = path.join(this.outputPath, 'bundles');
|
const outputDir = path.join(this.outputPath, 'teams');
|
||||||
|
|
||||||
// Create agent-config.txt
|
// Create agent-config.txt
|
||||||
const agentConfigContent = yaml.dump({
|
const agentConfigContent = yaml.dump({
|
||||||
|
|
@ -368,7 +368,7 @@ class WebBuilder {
|
||||||
*/
|
*/
|
||||||
ensureOutputDirectory() {
|
ensureOutputDirectory() {
|
||||||
this.ensureDirectory(this.outputPath);
|
this.ensureDirectory(this.outputPath);
|
||||||
this.ensureDirectory(path.join(this.outputPath, 'bundles'));
|
this.ensureDirectory(path.join(this.outputPath, 'teams'));
|
||||||
this.ensureDirectory(path.join(this.outputPath, 'agents'));
|
this.ensureDirectory(path.join(this.outputPath, 'agents'));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -49,7 +49,7 @@ class BundleOptimizer {
|
||||||
});
|
});
|
||||||
|
|
||||||
// Load and process resources
|
// Load and process resources
|
||||||
this.loadResources(optimizedBundle, agentDependencies.bundleResources);
|
this.loadResources(optimizedBundle, agentDependencies.bundleResources, agentDependencies.agents);
|
||||||
|
|
||||||
// Create optimized sections for web output
|
// Create optimized sections for web output
|
||||||
if (bundleConfig.target_environment === 'web') {
|
if (bundleConfig.target_environment === 'web') {
|
||||||
|
|
@ -65,7 +65,7 @@ class BundleOptimizer {
|
||||||
/**
|
/**
|
||||||
* Load resources from core directory
|
* Load resources from core directory
|
||||||
*/
|
*/
|
||||||
loadResources(bundle, resourceLists) {
|
loadResources(bundle, resourceLists, agentDeps = []) {
|
||||||
const resourceTypes = ['tasks', 'templates', 'checklists', 'data', 'utils'];
|
const resourceTypes = ['tasks', 'templates', 'checklists', 'data', 'utils'];
|
||||||
|
|
||||||
resourceTypes.forEach(type => {
|
resourceTypes.forEach(type => {
|
||||||
|
|
@ -85,11 +85,13 @@ class BundleOptimizer {
|
||||||
|
|
||||||
// Load personas for agents
|
// Load personas for agents
|
||||||
const personaDir = path.join(this.corePath, 'personas');
|
const personaDir = path.join(this.corePath, 'personas');
|
||||||
Object.keys(bundle.agents).forEach(agentId => {
|
agentDeps.forEach(agentDep => {
|
||||||
const personaContent = this.loadResourceFile(personaDir, agentId);
|
const agentId = agentDep.agent;
|
||||||
|
const personaName = agentDep.config.persona || agentId;
|
||||||
|
const personaContent = this.loadResourceFile(personaDir, personaName);
|
||||||
if (personaContent) {
|
if (personaContent) {
|
||||||
bundle.resources.personas[agentId] = {
|
bundle.resources.personas[agentId] = {
|
||||||
name: agentId,
|
name: personaName,
|
||||||
content: personaContent,
|
content: personaContent,
|
||||||
size: personaContent.length
|
size: personaContent.length
|
||||||
};
|
};
|
||||||
|
|
@ -202,7 +204,9 @@ class BundleOptimizer {
|
||||||
content += `${agent.description}\n\n`;
|
content += `${agent.description}\n\n`;
|
||||||
|
|
||||||
if (persona) {
|
if (persona) {
|
||||||
content += `## Agent Persona\n\n${persona.content}\n\n`;
|
content += `==================== START: personas#${agentId} ====================\n`;
|
||||||
|
content += `${persona.content}\n`;
|
||||||
|
content += `==================== END: personas#${agentId} ====================\n\n`;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Add required resources inline
|
// Add required resources inline
|
||||||
|
|
@ -210,9 +214,10 @@ class BundleOptimizer {
|
||||||
resourceTypes.forEach(type => {
|
resourceTypes.forEach(type => {
|
||||||
const resources = bundle.resources[type];
|
const resources = bundle.resources[type];
|
||||||
if (Object.keys(resources).length > 0) {
|
if (Object.keys(resources).length > 0) {
|
||||||
content += `## ${type.charAt(0).toUpperCase() + type.slice(1)}\n\n`;
|
|
||||||
Object.entries(resources).forEach(([name, resource]) => {
|
Object.entries(resources).forEach(([name, resource]) => {
|
||||||
content += `### ${name}\n\n${resource.content}\n\n`;
|
content += `==================== START: ${type}#${name} ====================\n`;
|
||||||
|
content += `${resource.content}\n`;
|
||||||
|
content += `==================== END: ${type}#${name} ====================\n\n`;
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
|
||||||
|
|
@ -39,9 +39,6 @@ class DependencyResolver {
|
||||||
if (rawConfig.dependencies) {
|
if (rawConfig.dependencies) {
|
||||||
config.dependencies = rawConfig.dependencies;
|
config.dependencies = rawConfig.dependencies;
|
||||||
}
|
}
|
||||||
if (rawConfig.environments) {
|
|
||||||
config.environments = rawConfig.environments;
|
|
||||||
}
|
|
||||||
|
|
||||||
// Validate required fields
|
// Validate required fields
|
||||||
this.validateAgentConfig(config, agentId);
|
this.validateAgentConfig(config, agentId);
|
||||||
|
|
@ -66,9 +63,10 @@ class DependencyResolver {
|
||||||
throw new Error(`Agent ID mismatch: expected '${agentId}', got '${config.id}'`);
|
throw new Error(`Agent ID mismatch: expected '${agentId}', got '${config.id}'`);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Ensure environments exist with defaults
|
// Ensure persona exists
|
||||||
if (!config.environments) {
|
if (!config.persona) {
|
||||||
config.environments = { web: {}, ide: {} };
|
// Default to agent id if no persona specified
|
||||||
|
config.persona = config.id;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Ensure dependencies exist with defaults
|
// Ensure dependencies exist with defaults
|
||||||
|
|
@ -88,11 +86,6 @@ class DependencyResolver {
|
||||||
resolveAgentDependencies(agentId, environment = 'web') {
|
resolveAgentDependencies(agentId, environment = 'web') {
|
||||||
const config = this.loadAgentConfig(agentId);
|
const config = this.loadAgentConfig(agentId);
|
||||||
|
|
||||||
// Check if agent is available for this environment
|
|
||||||
if (environment === 'web' && config.environments.web?.available === false) {
|
|
||||||
throw new Error(`Agent '${agentId}' is not available for web environment`);
|
|
||||||
}
|
|
||||||
|
|
||||||
const dependencies = {
|
const dependencies = {
|
||||||
agent: agentId,
|
agent: agentId,
|
||||||
config: config,
|
config: config,
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue