import { spawn as nodeSpawn } from 'node:child_process'; export interface McpProbeServerDescriptor { command: string; args: readonly string[]; env?: Readonly>; } export interface McpProbeRequest { /** Per-server descriptors as they appear in the per-spawn mcp.json * *after* placeholder expansion. Iteration order is preserved on the * returned Map. */ servers: ReadonlyMap; /** Inherited env for the probe child. The descriptor's `env` block is * merged on top. */ baseEnv: NodeJS.ProcessEnv; /** Per-server probe timeout. After this elapses the child is SIGKILLed * and the server's tool list is reported as empty. */ timeoutMs: number; } export interface McpProbeDeps { /** Injection seam for tests. Production binds to `child_process.spawn`. */ spawn?: typeof nodeSpawn; /** Optional logger for probe-side diagnostics. Per-spawn failures here * are not fatal — the aggregator continues. */ logger?: (line: string) => void; } /** Result of one probe — server-name → unprefixed tool names (e.g. * `memory-write`, not the qualified `mcp__plugin_memory_memory__memory-write`). * The prefix is applied by the aggregator, which builds both the long * (installed-plugin) and short (per-spawn public) shapes so the comparison * matches whichever argv allowlist a spawn type uses. A server that errored, * timed out, or returned a malformed response maps to an empty array; the * aggregator's not-exposed field surfaces the gap. */ export type McpProbeResult = ReadonlyMap; /** Probe every server in parallel. Returns a Map keyed by server name with * insertion order matching the input. Missing/errored servers map to []. * Never throws — probe failures are surfaced through empty arrays. */ export declare function probeMcpServerTools(req: McpProbeRequest, deps?: McpProbeDeps): Promise; //# sourceMappingURL=mcp-tools-probe.d.ts.map