/**
 * ╔══════════════════════════════════════════════════════════════════════╗
 * ║   OVERMIND BRIDGE — BridgeProxy (Base Client SDK Proxy)              ║
 * ║                                                                      ║
 * ║   [SCRIPT DE BASE - CLIENT SDK LOW-LEVEL TRANSPORT]                  ║
 * ║   Couche basse : transport JSON-RPC 2.0 vers Overmind MCP Server.   ║
 * ║   Gère : reconnexion, health checks, circuit breaker, SSE streaming.║
 * ║                                                                      ║
 * ║   ARCHITECTURE                                                       ║
 * ║   ─────────────                                                      ║
 * ║   OverBridgeService → BridgeProxy → HTTP localhost:3099/mcp          ║
 * ║                                              → Overmind MCP Server  ║
 * ╚══════════════════════════════════════════════════════════════════════╝
 */
import type { BridgeConfig, CircuitBreakerConfig, CircuitState, HealthStatus, McpResponse } from './types.js';
import { type BridgeLogger } from './utils.js';
export declare class BridgeProxy {
    private rpcId;
    private readonly config;
    private readonly circuit;
    readonly log: BridgeLogger;
    constructor(config?: Partial<BridgeConfig>, circuitConfig?: Partial<CircuitBreakerConfig>, logger?: BridgeLogger);
    get mcpUrl(): string;
    get agentTimeout(): number;
    get circuitState(): CircuitState;
    /**
     * Appelle un tool MCP via JSON-RPC 2.0 sur HTTP.
     *
     * TIMEOUT STRATEGY (3 couches) :
     *   1. AbortController sur le fetch initial
     *   2. Body reader avec deadline absolue
     *   3. Promise.race per-chunk (sécurité si le serveur ne produit plus)
     *
     * @param toolName  Nom de l'outil MCP (ex: 'run_agent', 'memory_search')
     * @param args      Arguments de l'outil
     * @param timeoutMs Timeout en ms (default: config.defaultTimeoutMs)
     */
    call(toolName: string, args: Record<string, unknown>, timeoutMs?: number): Promise<McpResponse>;
    /**
     * Envoie une requête de ping JSON-RPC standard légère au serveur.
     */
    ping(timeoutMs?: number): Promise<boolean>;
    healthCheck(): Promise<HealthStatus>;
    private _fetch;
    /**
     * Lecture du body response avec 3 couches de timeout :
     *   1. Deadline absolue (startRead + timeoutMs)
     *   2. Promise.race per-chunk
     *   3. reader.cancel() sur timeout
     */
    private _readBody;
}
//# sourceMappingURL=BridgeProxy.d.ts.map