import { type Message, type MessageCallback, type RelayConfig } from './types.js';
export declare class RelayTransport {
    readonly agentName: string;
    readonly config: import("./types.js").ResolvedRelayConfig;
    agentId?: string;
    token?: string;
    private ws?;
    private messageCallback?;
    private closing;
    private reconnectDelayMs;
    private reconnectTimer?;
    private wsConnectPromise?;
    constructor(agentName: string, config?: RelayConfig);
    connect(): Promise<void>;
    disconnect(): Promise<void>;
    onWsMessage(callback: MessageCallback): void;
    registerAgent(): Promise<string>;
    unregisterAgent(): Promise<void>;
    sendDm(to: string, text: string): Promise<string>;
    postMessage(channel: string, text: string): Promise<string>;
    reply(messageId: string, text: string): Promise<string>;
    checkInbox(): Promise<Message[]>;
    listAgents(): Promise<string[]>;
    private ensureRegistered;
    private requireConfig;
    private sendHttpAsAgent;
    private sendHttp;
    private connectWebSocket;
    private wsBaseUrl;
    private scheduleReconnect;
    private clearReconnectTimer;
    private dispatchWsPayload;
    private messageFromPayload;
    private errorMessage;
}
//# sourceMappingURL=transport.d.ts.map