import type { AgentToolResult, AgentToolUpdateCallback } from "@sheason/pi-coding-agent";
import type { PeerRegistry } from "../peers/peer-registry.js";
import type { RegisteredPeer } from "../peers/peer-types.js";
import type { SocketHubServer } from "../transport/socket-hub-server.js";
export interface ExecutePeerToolOptions<TDetails> {
    toolCallId: string;
    toolName: string;
    peerId: string;
    args: Record<string, unknown>;
    signal?: AbortSignal;
    onUpdate?: AgentToolUpdateCallback<TDetails>;
    timeoutMs?: number;
}
export interface PeerToolBridgeOptions {
    resolvePeer?: (peerId: string) => RegisteredPeer | undefined;
}
export declare class PeerToolBridge {
    private readonly agentId;
    private readonly peerRegistry;
    private readonly transport;
    private readonly options;
    private readonly pendingCalls;
    private readonly unsubscribePeerRegistry;
    private readonly unsubscribeToolAck;
    private readonly unsubscribeToolUpdate;
    private readonly unsubscribeToolResult;
    private readonly unsubscribeToolError;
    constructor(agentId: string, peerRegistry: PeerRegistry, transport: SocketHubServer, options?: PeerToolBridgeOptions);
    executeTool<TDetails>(options: ExecutePeerToolOptions<TDetails>): Promise<AgentToolResult<TDetails>>;
    dispose(): void;
    private failPendingForPeer;
    private cleanupPendingCall;
}
//# sourceMappingURL=peer-tool-bridge.d.ts.map