/** * Stream lifecycle diagnostics for provider clients. * * Tracks connection, iteration, event counts, and completion * to fill the observability gap between stream start and timeout/error. * All output is debug-level only. */ export interface StreamDiagnostics { /** Call when the stream connection resolves (runStreamed / subscribe) */ onConnected(): void; /** Call at the top of each for-await iteration (logs only on first call) */ onFirstEvent(eventType: string): void; /** Call for each event to track count and last type (no log output) */ onEvent(eventType: string): void; /** Call when the idle timeout callback fires (before abort) */ onIdleTimeoutFired(): void; /** Call when error events are received (turn.failed, session.error, etc.) */ onStreamError(eventType: string, message: string): void; /** Call on stream completion with reason */ onCompleted(reason: 'normal' | 'timeout' | 'abort' | 'error', detail?: string): void; } export declare function createStreamDiagnostics(component: string, context: Record): StreamDiagnostics; //# sourceMappingURL=streamDiagnostics.d.ts.map