import type { CredentialValueSource, ModelConfig, RealtimeCaps, RealtimeSession, SecretRedactor } from "@arnilo/prism"; export interface RealtimeTransportOptions { /** Official Realtime WebSocket authentication headers. */ readonly headers: Readonly>; } export interface OpenAIRealtimeSessionOptions { /** Host-owned local session id. Generated when omitted. */ readonly id?: string; /** Stable host ownership identifier, sent to OpenAI as its safety identifier. */ readonly ownerId: string; readonly model: ModelConfig; readonly apiKey?: CredentialValueSource; readonly baseUrl?: string; /** Injectable transport factory for tests or a host WebSocket implementation. */ readonly webSocket?: (url: string, options: RealtimeTransportOptions) => RealtimeTransport; readonly caps?: RealtimeCaps; readonly redactor?: SecretRedactor; readonly signal?: AbortSignal; } /** Minimal transport surface the session consumes. Matches the global WebSocket subset. */ export interface RealtimeTransport { readonly readyState: number; send(data: string): void; close(code?: number, reason?: string): void; addEventListener(type: "open" | "message" | "close" | "error", handler: (event: { readonly data?: string; }) => void): void; removeEventListener?(type: "open" | "message" | "close" | "error", handler: (event: { readonly data?: string; }) => void): void; } export declare function createOpenAIRealtimeSession(options: OpenAIRealtimeSessionOptions): RealtimeSession;