import type { ToolDefinition } from "@sheason/pi-coding-agent";
import { McpHost, type PeerConfigSnapshot, type ToolCallAckPayload, type ToolCallErrorPayload, type ToolCallRequestPayload, type ToolCallResultPayload, type ToolCallUpdatePayload } from "../../hub/index.js";
export interface PeerMcpRuntimeHost {
    start(): Promise<void>;
    stop(): Promise<void>;
    getStatuses(): ReturnType<McpHost["getStatuses"]>;
    getConfigError(): ReturnType<McpHost["getConfigError"]>;
    getSharedCustomToolsArray(): ToolDefinition[];
}
export interface PeerMcpRuntimeSocket {
    emit(event: "tool:call_ack", payload: ToolCallAckPayload): void;
    emit(event: "tool:call_update", payload: ToolCallUpdatePayload): void;
    emit(event: "tool:call_result", payload: ToolCallResultPayload): void;
    emit(event: "tool:call_error", payload: ToolCallErrorPayload): void;
}
export interface PeerMcpRuntimeOptions {
    cwd: string;
    snapshot: PeerConfigSnapshot;
    host?: PeerMcpRuntimeHost;
}
export declare function mergePeerMcpConfig(snapshot: PeerConfigSnapshot): {
    servers: unknown[];
};
export declare class PeerMcpRuntime {
    private readonly options;
    private host;
    constructor(options: PeerMcpRuntimeOptions);
    start(): Promise<void>;
    stop(): Promise<void>;
    getSnapshot(): {
        servers: import("../../hub/index.js").McpRuntimeStatus[];
        configError?: string | undefined;
    };
    getRemoteToolNames(peerId: string): string[];
    executeToolRequest(peerId: string, payload: ToolCallRequestPayload, socket: PeerMcpRuntimeSocket): Promise<boolean>;
    private findLocalTool;
    private requireHost;
}
//# sourceMappingURL=peer-mcp-runtime.d.ts.map