/**
 * Responses协议事件生成器
 * 提供纯函数，将Responses响应数据转换为SSE事件对象，不处理流写入
 */
import type { ResponsesSseEvent, ResponsesResponse, ResponsesOutputItem, ResponsesFunctionCallItem, ResponsesReasoningItem, ResponsesContent } from '../../types/index.js';
export interface ResponsesEventGeneratorConfig {
    chunkSize: number;
    chunkDelayMs: number;
    enableIdGeneration: boolean;
    enableTimestampGeneration: boolean;
    enableSequenceNumbers: boolean;
    enableDelay: boolean;
}
export interface ResponsesEventGeneratorContext {
    requestId: string;
    model: string;
    outputIndexCounter: number;
    contentIndexCounter: Map<string, number>;
    sequenceCounter: number;
}
export declare const DEFAULT_RESPONSES_EVENT_GENERATOR_CONFIG: ResponsesEventGeneratorConfig;
/**
 * 创建默认上下文
 */
export declare function createDefaultResponsesContext(requestId: string, model: string): ResponsesEventGeneratorContext;
/**
 * 构建response.created + response.in_progress事件
 * 映射：response.start → response.created + response.in_progress
 */
export declare function buildResponseStartEvents(response: ResponsesResponse, context: ResponsesEventGeneratorContext, config?: ResponsesEventGeneratorConfig): Generator<ResponsesSseEvent>;
/**
 * 构建response.output_item.added事件
 * 映射：output_item.start → response.output_item.added
 */
export declare function buildOutputItemStartEvent(outputItem: ResponsesOutputItem, context: ResponsesEventGeneratorContext, config?: ResponsesEventGeneratorConfig): ResponsesSseEvent;
/**
 * 构建response.content_part.added事件
 * 映射：content_part.start → response.content_part.added
 */
export declare function buildContentPartStartEvent(outputItemId: string, contentIndex: number, content: ResponsesContent, context: ResponsesEventGeneratorContext, config?: ResponsesEventGeneratorConfig): ResponsesSseEvent;
/**
 * 构建response.output_text.delta事件流
 * 映射：content_part.delta (input_text/output_text/…) → response.output_text.delta
 * 对于 reasoning 使用 response.reasoning_text.delta
 */
export declare function buildContentPartDeltas(outputItemId: string, contentIndex: number, text: string, context: ResponsesEventGeneratorContext, config?: ResponsesEventGeneratorConfig): Generator<ResponsesSseEvent>;
/**
 * 构建content_part.done事件
 */
export declare function buildContentPartDoneEvent(outputItemId: string, contentIndex: number, content: ResponsesContent | undefined, context: ResponsesEventGeneratorContext, config?: ResponsesEventGeneratorConfig): ResponsesSseEvent;
export declare function buildOutputTextDoneEvent(outputItemId: string, contentIndex: number, fullText: string, context: ResponsesEventGeneratorContext, config?: ResponsesEventGeneratorConfig): ResponsesSseEvent;
/**
 * 构建response.function_call_arguments.delta/done的start部分
 * 映射：function_call.start → 隐含在第一个 delta 中
 */
/**
 * 构建response.function_call_arguments.delta事件流
 * 映射：function_call.delta → response.function_call_arguments.delta
 */
export declare function buildFunctionCallArgsDeltas(functionCall: ResponsesFunctionCallItem, context: ResponsesEventGeneratorContext, config?: ResponsesEventGeneratorConfig): Generator<ResponsesSseEvent>;
/**
 * 构建response.function_call_arguments.done事件
 * 映射：function_call.done → response.function_call_arguments.done
 */
export declare function buildFunctionCallDoneEvent(functionCall: ResponsesFunctionCallItem, context: ResponsesEventGeneratorContext, config?: ResponsesEventGeneratorConfig): ResponsesSseEvent;
/**
 * 构建reasoning.start事件
 */
export declare function buildReasoningStartEvent(reasoning: ResponsesReasoningItem, context: ResponsesEventGeneratorContext, config?: ResponsesEventGeneratorConfig): ResponsesSseEvent;
/**
 * 构建response.reasoning_text.delta事件流
 * 映射：reasoning.delta → response.reasoning_text.delta
 */
export declare function buildReasoningDeltas(reasoning: ResponsesReasoningItem, context: ResponsesEventGeneratorContext, config?: ResponsesEventGeneratorConfig): Generator<ResponsesSseEvent>;
/**
 * 构建response.reasoning_summary_*事件流
 */
export declare function buildReasoningSummaryEvents(reasoning: ResponsesReasoningItem, context: ResponsesEventGeneratorContext, config?: ResponsesEventGeneratorConfig): Generator<ResponsesSseEvent>;
/**
 * 构建reasoning.done事件
 */
export declare function buildReasoningDoneEvent(reasoning: ResponsesReasoningItem, context: ResponsesEventGeneratorContext, config?: ResponsesEventGeneratorConfig): ResponsesSseEvent;
/**
 * 构建output_item.done事件
 */
export declare function buildOutputItemDoneEvent(outputItem: ResponsesOutputItem, context: ResponsesEventGeneratorContext, config?: ResponsesEventGeneratorConfig): ResponsesSseEvent;
/**
 * 构建required_action事件
 */
export declare function buildRequiredActionEvent(response: ResponsesResponse, requiredAction: any, context: ResponsesEventGeneratorContext, config?: ResponsesEventGeneratorConfig): ResponsesSseEvent;
/**
 * 构建response.completed事件
 * 新增：在 done 之前增加 response.completed
 */
export declare function buildResponseCompletedEvent(response: ResponsesResponse, context: ResponsesEventGeneratorContext, config?: ResponsesEventGeneratorConfig): ResponsesSseEvent;
/**
 * 构建response.done事件
 */
export declare function buildResponseDoneEvent(response: ResponsesResponse, context: ResponsesEventGeneratorContext, config?: ResponsesEventGeneratorConfig): ResponsesSseEvent;
/**
 * 构建error事件
 */
export declare function buildErrorEvent(error: Error, context: ResponsesEventGeneratorContext, config?: ResponsesEventGeneratorConfig): ResponsesSseEvent;
