export interface OfficeSocketOpts { /** Called for every decoded JSON text frame from the server. */ onMessage: (msg: Record) => void; /** Optional stderr logger (never stdout — that carries MCP frames). */ log?: (line: string) => void; /** Extra metadata merged into the agent_online frame (provider, etc.). */ meta?: Record; } export declare class OfficeSocket { private readonly wsUrl; private readonly apiKey; private readonly slug; private readonly opts; private _socket; private _buffer; private _connected; private _destroyed; private _reconnectTimer; private _pingTimer; private _lastPongAt; private _fragOpcode; private _fragChunks; constructor(wsUrl: string, apiKey: string, slug: string, opts: OfficeSocketOpts); start(): void; /** True while a live connection is up. */ isConnected(): boolean; /** * Send a JSON payload to the server as a WebSocket text frame. Used by the * bridge to reply to control frames (e.g. fb_response for the office file * browser). No-op if the socket isn't currently connected. */ sendFrame(obj: Record): void; destroy(): void; private _log; private _connect; private _closeSocket; private _scheduleReconnect; private _processBuffer; private _parseFrame; private _onFrame; private _sendJson; private _sendTextFrame; private _sendPong; private _sendPing; private _startHeartbeat; private _stopHeartbeat; }