/**
 * Streaming Error Classes
 * Defines error types for SSE streaming with retryability flags
 */
/**
 * Base streaming error interface
 */
export interface StreamingError {
    type: 'network' | 'timeout' | 'parse' | 'abort' | 'server';
    message: string;
    details?: unknown;
    retryable: boolean;
}
/**
 * Network error - typically connection issues or fetch failures
 * Retryable: Yes
 */
export declare class StreamingNetworkError extends Error implements StreamingError {
    details?: unknown | undefined;
    type: "network";
    retryable: boolean;
    constructor(message: string, details?: unknown | undefined);
}
/**
 * Timeout error - request exceeded specified timeout duration
 * Retryable: Yes
 */
export declare class StreamingTimeoutError extends Error implements StreamingError {
    type: "timeout";
    retryable: boolean;
    constructor(timeout: number);
}
/**
 * Parse error - invalid JSON or malformed SSE data
 * Retryable: No (indicates server-side issue or format mismatch)
 */
export declare class StreamingParseError extends Error implements StreamingError {
    chunk?: string | undefined;
    type: "parse";
    retryable: boolean;
    constructor(message: string, chunk?: string | undefined);
}
/**
 * Abort error - user manually cancelled the stream
 * Retryable: No (user initiated)
 */
export declare class StreamingAbortError extends Error implements StreamingError {
    type: "abort";
    retryable: boolean;
    constructor();
}
/**
 * Server error - HTTP error response from server (4xx, 5xx)
 * Retryable: No for 4xx, could be Yes for 5xx but defaulting to No
 */
export declare class StreamingServerError extends Error implements StreamingError {
    status: number;
    details?: unknown | undefined;
    type: "server";
    retryable: boolean;
    constructor(status: number, statusText: string, details?: unknown | undefined);
}
/**
 * Normalize any error into a StreamingError
 * Used to convert unknown errors (from fetch, network, etc.) into typed streaming errors
 *
 * @param error - Any error object
 * @returns Normalized StreamingError
 */
export declare const normalizeError: (error: unknown) => StreamingError;
