import type { Readable, Writable } from 'node:stream'; import { type McpToolContext } from './mcp-tools.js'; export interface McpJsonRpcRequest { jsonrpc?: string; id?: string | number | null; method?: string; params?: unknown; } export interface McpJsonRpcSuccess { jsonrpc: '2.0'; id: string | number | null; result: unknown; } export interface McpJsonRpcFailure { jsonrpc: '2.0'; id: string | number | null; error: { code: number; message: string; data?: unknown; }; } export type McpJsonRpcResponse = McpJsonRpcSuccess | McpJsonRpcFailure; export type McpJsonRpcLineResult = McpJsonRpcResponse | McpJsonRpcResponse[] | null; export declare function handleMcpJsonRpcLine(line: string, context: McpToolContext): McpJsonRpcLineResult; export declare function handleMcpJsonRpcRequest(parsed: unknown, context: McpToolContext): McpJsonRpcResponse | null; export declare function renderMcpValidationStatus(root: string): string; export declare function runMcpStdioServer(context: McpToolContext, input?: Readable, output?: Writable): Promise; export declare function runMcpCommand(args: string[], root?: string): Promise;