Revert changes that moved agents to the command directory in the opencode installer
This commit is contained in:
parent
ed3603f7b2
commit
01b1ce7b1e
|
|
@ -2,7 +2,7 @@
|
||||||
|
|
||||||
## Activating Agents
|
## Activating Agents
|
||||||
|
|
||||||
BMAD agents are installed as OpenCode agents in `.opencode/agent/BMAD/{module_name}` and workflow commands in `.opencode/command/BMAD/{module_name}`.
|
BMAD agents are installed as OpenCode agents in `.opencode/agent/{module_name}` and workflow commands in `.opencode/command/{module_name}`.
|
||||||
|
|
||||||
### How to Use
|
### How to Use
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -25,12 +25,13 @@ class OpenCodeSetup extends BaseIdeSetup {
|
||||||
|
|
||||||
const baseDir = path.join(projectDir, this.configDir);
|
const baseDir = path.join(projectDir, this.configDir);
|
||||||
const commandsBaseDir = path.join(baseDir, this.commandsDir);
|
const commandsBaseDir = path.join(baseDir, this.commandsDir);
|
||||||
|
const agentsBaseDir = path.join(baseDir, this.agentsDir);
|
||||||
|
|
||||||
|
await this.ensureDir(agentsBaseDir);
|
||||||
await this.ensureDir(commandsBaseDir);
|
await this.ensureDir(commandsBaseDir);
|
||||||
|
|
||||||
// Install primary agents with flat naming: bmad-agent-{module}-{name}.md
|
// Install primary agents with flat naming: bmad-agent-{module}-{name}.md
|
||||||
// OpenCode puts agents in the command folder, not a separate agent folder
|
const agents = await getAgentsFromBmad(agentsBaseDir, options.selectedModules || []);
|
||||||
const agents = await getAgentsFromBmad(bmadDir, options.selectedModules || []);
|
|
||||||
|
|
||||||
let agentCount = 0;
|
let agentCount = 0;
|
||||||
for (const agent of agents) {
|
for (const agent of agents) {
|
||||||
|
|
@ -41,7 +42,7 @@ class OpenCodeSetup extends BaseIdeSetup {
|
||||||
|
|
||||||
const agentContent = this.createAgentContent(processed, agent);
|
const agentContent = this.createAgentContent(processed, agent);
|
||||||
// Flat structure in command folder: bmad-agent-{module}-{name}.md
|
// Flat structure in command folder: bmad-agent-{module}-{name}.md
|
||||||
const targetPath = path.join(commandsBaseDir, `bmad-agent-${agent.module}-${agent.name}.md`);
|
const targetPath = path.join(agentsDir, `bmad-agent-${agent.module}-${agent.name}.md`);
|
||||||
await this.writeFile(targetPath, agentContent);
|
await this.writeFile(targetPath, agentContent);
|
||||||
agentCount++;
|
agentCount++;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue