(agent: AgentDefinition)
| 71 | * @throws Error if any referenced environment variable is missing |
| 72 | */ |
| 73 | export function resolveAgentMcpEnv(agent: AgentDefinition): void { |
| 74 | if (!agent.mcpServers) return |
| 75 | |
| 76 | for (const [serverName, config] of Object.entries(agent.mcpServers)) { |
| 77 | if ('command' in config && config.env) { |
| 78 | config.env = resolveMcpEnv(config.env, agent.id, serverName) |
| 79 | } |
| 80 | } |
| 81 | } |
| 82 | |
| 83 | /** |
| 84 | * Validation error for an agent that failed validation. |
no test coverage detected