MCPcopy Index your code
hub / github.com/github/copilot-sdk / toWireCustomAgents

Function toWireCustomAgents

nodejs/src/client.ts:241–248  ·  view source on GitHub ↗

* Convert custom agent configs, transforming nested mcpServers from * public API format (workingDirectory) to wire format (cwd).

(agents: CustomAgentConfig[] | undefined)

Source from the content-addressed store, hash-verified

239 * public API format (workingDirectory) to wire format (cwd).
240 */
241function 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

Callers 2

createSessionMethod · 0.85
resumeSessionMethod · 0.85

Calls 1

toWireMcpServersFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…