/**
 * SocketServer - Unix domain socket server for attachable draht sessions
 *
 * Enables tmux-style multi-client attachment:
 * - Multiple readers/writers can connect simultaneously
 * - All clients see the same output
 * - Input from any client is echoed to all others
 * - Clients can join/leave without disrupting the session
 */
export interface SocketServerOptions {
    /** Session ID (used for socket filename) */
    sessionId: string;
    /** Directory for socket files (default: ~/.draht/agent/sockets) */
    socketDir: string;
    /** Current working directory (included in metadata) */
    cwd: string;
    /** Maximum number of concurrent clients */
    maxClients?: number;
    /** Whether to echo input to all clients (tmux-style) */
    broadcastInputEcho?: boolean;
}
/**
 * SocketServer manages a Unix domain socket for a single draht session.
 *
 * Clients connect, send input, and receive output in real-time.
 * All communication uses JSON-over-socket with newline framing.
 */
export declare class SocketServer {
    #private;
    constructor(options: SocketServerOptions);
    /**
     * Start the socket server.
     * Creates socket directory, binds Unix socket, and starts listening.
     */
    start(): Promise<void>;
    /**
     * Stop the socket server and clean up.
     */
    stop(): Promise<void>;
    /**
     * Broadcast output to all connected clients.
     *
     * @param data - Output text
     * @param stream - Output stream (stdout or stderr)
     */
    broadcastOutput(data: string, stream?: "stdout" | "stderr"): void;
    /**
     * Set callback for input received from clients.
     */
    onInput(callback: (data: string, clientId: string) => void): void;
    /**
     * Get socket path for this session.
     */
    get socketPath(): string;
    /**
     * Get number of connected clients.
     */
    get clientCount(): number;
}
//# sourceMappingURL=socket-server.d.ts.map