/**
 * Responses SSE → JSON转换器（重构版本）
 * 使用函数化架构：解析 + 构建 + 验证分离
 */
import type { ResponsesResponse, SseToResponsesJsonContext, SseToResponsesJsonOptions, ResponsesSseEventStream } from '../types/index.js';
/**
 * 重构后的Responses SSE到JSON转换器
 * 采用函数化架构，专注于编排而非具体业务逻辑
 */
export declare class ResponsesSseToJsonConverterRefactored {
    private config;
    private contexts;
    constructor(config?: Partial<ResponsesSseToJsonConverterRefactored['config']>);
    /**
     * 将SSE流转换为Responses响应
     */
    convertSseToJson(sseStream: ResponsesSseEventStream, options: SseToResponsesJsonOptions): Promise<ResponsesResponse>;
    private isTerminatedError;
    /**
     * 创建可读流
     */
    private createReadableStream;
    /**
     * 将异步可迭代对象转换为流
     */
    private convertAsyncIterableToStream;
    /**
     * 将事件对象序列化为SSE格式（简单实现）
     */
    private serializeEventToSSE;
    private chunkStrings;
    /**
     * 验证序列号
     */
    private validateSequenceNumber;
    /**
     * 更新统计信息
     */
    private updateStats;
    /**
     * 包装错误
     */
    private wrapError;
    /**
     * 创建上下文
     */
    private createContext;
    /**
     * 获取上下文
     */
    getContext(requestId: string): SseToResponsesJsonContext | undefined;
    /**
     * 清理上下文
     */
    clearContext(requestId: string): void;
    /**
     * 获取所有活跃的上下文
     */
    getActiveContexts(): Map<string, SseToResponsesJsonContext>;
}
export declare const ResponsesSseToJsonConverter: typeof ResponsesSseToJsonConverterRefactored;
