import { Client } from '@modelcontextprotocol/sdk/client/index.js'; import { StreamableHTTPClientTransport } from '@modelcontextprotocol/sdk/client/streamableHttp.js'; /** @internal - overrideable constructors for testing */ interface MeshClientDeps { Client: typeof Client; Transport: typeof StreamableHTTPClientTransport; } declare function createMeshClient(opts: MeshClientOptions, /** @internal */ _deps?: Partial): MeshClient; type ToolMap = Record; type MeshClientInstance = { [K in keyof T]: (input: T[K]["input"]) => Promise; }; type MeshClient = MeshClientInstance & { /** Close the underlying MCP connection and reset it so the next call reconnects. */ close(): Promise; }; interface MeshClientOptions { mcpId: string; /** Falls back to process.env.MESH_API_KEY */ apiKey?: string; /** Falls back to https://studio.decocms.com */ baseUrl?: string; } export { type MeshClient, type MeshClientInstance, type MeshClientOptions, type ToolMap, createMeshClient };