* Create a custom agent definition file in the workspace.
( workspacePath: string, agentId: string, content: string )
| 92 | * Create a custom agent definition file in the workspace. |
| 93 | */ |
| 94 | async function createAgentFile( |
| 95 | workspacePath: string, |
| 96 | agentId: string, |
| 97 | content: string |
| 98 | ): Promise<void> { |
| 99 | const agentsDir = path.join(workspacePath, ".mux", "agents"); |
| 100 | await fs.mkdir(agentsDir, { recursive: true }); |
| 101 | await fs.writeFile(path.join(agentsDir, `${agentId}.md`), content); |
| 102 | } |
| 103 | |
| 104 | /** |
| 105 | * Remove a custom agent definition file from the workspace. |