* Convert custom agent configs, transforming nested mcpServers from * public API format (workingDirectory) to wire format (cwd).
(agents: CustomAgentConfig[] | undefined)
| 239 | * public API format (workingDirectory) to wire format (cwd). |
| 240 | */ |
| 241 | function toWireCustomAgents(agents: CustomAgentConfig[] | undefined): unknown[] | undefined { |
| 242 | if (!agents) return undefined; |
| 243 | return agents.map((agent) => { |
| 244 | if (!agent.mcpServers) return agent; |
| 245 | const { mcpServers, ...rest } = agent; |
| 246 | return { ...rest, mcpServers: toWireMcpServers(mcpServers) }; |
| 247 | }); |
| 248 | } |
| 249 | |
| 250 | /** |
| 251 | * Convert a {@link LargeToolOutputConfig} from the public API shape |
no test coverage detected
searching dependent graphs…