/**
 * WebSocket JSON-RPC message types for the UI Bridge protocol.
 */
/** Standard JSON-RPC request */
export interface JsonRpcRequest {
    id: number | string;
    method: string;
    params?: Record<string, unknown>;
}
/** Batch request — execute multiple requests concurrently */
export interface JsonRpcBatchRequest {
    id: number | string;
    batch: JsonRpcRequest[];
}
/** Subscribe to registry events */
export interface JsonRpcSubscribe {
    id: number | string;
    method: 'subscribe';
    params: {
        events: string[];
        /** Optional throttle in ms — batch rapid events within this window */
        throttleMs?: number;
    };
}
/** Unsubscribe from registry events */
export interface JsonRpcUnsubscribe {
    id: number | string;
    method: 'unsubscribe';
    params: {
        events: string[];
    };
}
/** Any client message */
export type JsonRpcClientMessage = JsonRpcRequest | JsonRpcBatchRequest | JsonRpcSubscribe | JsonRpcUnsubscribe;
/** Standard JSON-RPC response */
export interface JsonRpcResponse {
    id: number | string;
    result?: {
        success: boolean;
        data?: unknown;
        error?: string;
        code?: string;
        timestamp?: number;
    };
}
/** Batch response */
export interface JsonRpcBatchResponse {
    id: number | string;
    results: JsonRpcResponse[];
}
/** Server-pushed event (no id — not a response to a request) */
export interface JsonRpcEvent {
    event: string;
    data: unknown;
    timestamp: number;
}
/** Any server message */
export type JsonRpcServerMessage = JsonRpcResponse | JsonRpcBatchResponse | JsonRpcEvent;
/** Check if a message is a batch request */
export declare function isBatchRequest(msg: unknown): msg is JsonRpcBatchRequest;
/** Check if a message is a subscribe request */
export declare function isSubscribe(msg: unknown): msg is JsonRpcSubscribe;
/** Check if a message is an unsubscribe request */
export declare function isUnsubscribe(msg: unknown): msg is JsonRpcUnsubscribe;
//# sourceMappingURL=ws-types.d.ts.map