(tools: ToolDefinition[])
| 20 | })); |
| 21 | |
| 22 | function createCatalog(tools: ToolDefinition[]): ToolCatalog { |
| 23 | return { |
| 24 | tools, |
| 25 | getByCliName: (name) => tools.find((tool) => tool.cliName === name) ?? null, |
| 26 | getByMcpName: (name) => tools.find((tool) => tool.mcpName === name) ?? null, |
| 27 | getByToolId: (toolId) => tools.find((tool) => tool.id === toolId) ?? null, |
| 28 | resolve: (input) => { |
| 29 | const tool = |
| 30 | tools.find((candidate) => candidate.cliName === input) ?? |
| 31 | tools.find((candidate) => candidate.mcpName === input); |
| 32 | return tool ? { tool } : { notFound: true }; |
| 33 | }, |
| 34 | }; |
| 35 | } |
| 36 | |
| 37 | async function createSocketPath(): Promise<string> { |
| 38 | const directory = await mkdtemp(path.join(tmpdir(), 'xcodebuildmcp-daemon-')); |
no outgoing calls
no test coverage detected