fix: ModuleManager now creates customize.yaml files for agents

- Added logic to create customize template files during agent compilation
- ModuleManager was only using existing customize files, not creating them
- Now customize.yaml files will be created for all module agents
- This fixes issue where agents in subdirectories had no customization support

Next: Need to fix agent-manifest.csv to find agents in subdirectories
This commit is contained in:
Brian Madison 2025-12-06 16:02:07 -06:00
parent 1bd01e1ce6
commit f052967f65
2 changed files with 2996 additions and 0 deletions

File diff suppressed because it is too large Load Diff

View File

@ -679,6 +679,16 @@ class ModuleManager {
const yamlContent = await fs.readFile(sourceYamlPath, 'utf8');
const { compileAgent } = require('../../../lib/agent/compiler');
// Create customize template if it doesn't exist
if (!(await fs.pathExists(customizePath))) {
const { getSourcePath } = require('../../../lib/project-root');
const genericTemplatePath = getSourcePath('utility', 'templates', 'agent.customize.template.yaml');
if (await fs.pathExists(genericTemplatePath)) {
await this.copyFileWithPlaceholderReplacement(genericTemplatePath, customizePath);
console.log(chalk.dim(` Created customize: ${moduleName}-${agentName}.customize.yaml`));
}
}
// Check for customizations
let customizedFields = [];
if (await fs.pathExists(customizePath)) {