import type { Config } from '../config/schema.js';
import type { ApprovalDecision, ApprovalKind, ClaudeChannelMode, ConversationDescriptor, PendingApproval, QueueEvent, WaitFilter } from './channel-shared.js';
export declare class XopcChannelBridge {
    private readonly cfg;
    private readonly params;
    private client;
    private readonly queue;
    private readonly pendingApprovals;
    private cursor;
    private closed;
    private eventsAbort;
    constructor(cfg: Config, params: {
        gatewayUrl?: string;
        gatewayToken?: string;
        claudeChannelMode: ClaudeChannelMode;
        verbose: boolean;
    });
    setServer(_server: unknown): void;
    start(): Promise<void>;
    close(): Promise<void>;
    private connectEvents;
    private runEventsLoop;
    private handleSseChunk;
    private enqueueFromBroadcast;
    private pushEvent;
    listConversations(args: {
        limit?: number;
        search?: string;
        channel?: string;
    }): Promise<ConversationDescriptor[]>;
    getConversation(sessionKey: string): Promise<ConversationDescriptor | null>;
    readMessages(sessionKey: string, limit: number): Promise<Array<Record<string, unknown>>>;
    pollEvents(filter: WaitFilter, limit: number): {
        events: QueueEvent[];
        nextCursor: number;
    };
    waitForEvent(filter: WaitFilter, timeoutMs: number): Promise<QueueEvent | null>;
    sendMessage(params: {
        sessionKey: string;
        text: string;
    }): Promise<Record<string, unknown>>;
    listPendingApprovals(): PendingApproval[];
    respondToApproval(params: {
        kind: ApprovalKind;
        id: string;
        decision: ApprovalDecision;
    }): Promise<Record<string, unknown>>;
    handleClaudePermissionRequest(_params: {
        requestId: string;
        toolName: string;
        description: string;
        inputPreview: string;
    }): Promise<void>;
}
export declare function loadMcpServeConfig(): Config;
