import type { Config } from '../../config/schema.js';
import type { AgentIPCMessage } from './types.js';
export declare class AgentSocketServer {
    private server?;
    private readonly socketPath;
    private connections;
    private messageHandler?;
    constructor(config: Config, agentId: string);
    /**
     * Start the socket server
     */
    start(handler: (msg: AgentIPCMessage, reply: (response: AgentIPCMessage) => void) => Promise<void>): Promise<void>;
    /**
     * Stop the socket server
     */
    stop(): Promise<void>;
    /**
     * Get connection count
     */
    getConnectionCount(): number;
    private handleConnection;
    private handleMessage;
}
export declare class AgentSocketClient {
    private socket?;
    private readonly socketPath;
    private pendingResponses;
    constructor(config: Config, targetAgentId: string);
    /**
     * Connect to the socket server
     */
    connect(): Promise<void>;
    /**
     * Disconnect from the socket server
     */
    disconnect(): void;
    /**
     * Send a message and wait for response
     */
    sendAndWait(msg: AgentIPCMessage, timeoutMs?: number): Promise<AgentIPCMessage>;
    /**
     * Send a message without waiting for response
     */
    send(msg: AgentIPCMessage): Promise<void>;
    /**
     * Check if socket is connected
     */
    isConnected(): boolean;
    private startListening;
}
export declare function isSocketAvailable(config: Config, agentId: string): Promise<boolean>;
