/**
 * Types for the daemon's WebSocket connection to the gateway server.
 */
import type { Message } from "@pocketcoder/shared";
/** Connection states for the gateway WebSocket client */
export type ConnectionState = "disconnected" | "connecting" | "connected" | "reconnecting";
/** Events emitted by the WebSocket client */
export interface GatewayClientEvents {
    /** Connection established */
    connected: () => void;
    /** Connection closed */
    disconnected: (code: number, reason: string) => void;
    /** Message received from gateway */
    message: (message: Message | PingMessage) => void;
    /** Connection error */
    error: (error: Error) => void;
    /** Attempting to reconnect */
    reconnecting: (attempt: number, delayMs: number) => void;
    /** Successfully reconnected */
    reconnected: () => void;
}
/** Ping message from gateway (not part of standard Message union) */
export interface PingMessage {
    type: "ping";
}
/** Pong message sent to gateway */
export interface PongMessage {
    type: "pong";
}
/** Options for the WebSocket client */
export interface GatewayClientOptions {
    /** Gateway WebSocket URL (e.g., wss://gateway.pocketcoder.dev) */
    url: string;
    /** Enable automatic reconnection on unexpected disconnection (default: false) */
    autoReconnect?: boolean;
    /** Initial reconnection delay in ms (default: 1000) */
    reconnectBaseMs?: number;
    /** Maximum reconnection delay in ms (default: 60000) */
    reconnectMaxMs?: number;
}
//# sourceMappingURL=types.d.ts.map