/** * GlmtTransformer - Orchestrator for Anthropic ↔ OpenAI format transformation * * Pipeline Architecture: * - RequestTransformer: Anthropic → OpenAI request conversion * - StreamParser: Delta processing for streaming responses * - ResponseBuilder: SSE event generation * - ToolCallHandler: Tool call processing */ import { DeltaAccumulator } from './delta-accumulator'; import { type AnthropicRequest, type OpenAIResponse, type AnthropicResponse, type ThinkingConfig, type TransformResult, type SSEEvent, type AnthropicSSEEvent, type GlmtTransformerConfig, type Message, type ThinkingSignature, type ValidationResult } from './pipeline'; export declare class GlmtTransformer { private verbose; private debugLog; debugLogDir: string; private requestTransformer; private streamParser; private responseBuilder; private toolCallHandler; private contentTransformer; constructor(config?: GlmtTransformerConfig); /** Transform Anthropic request to OpenAI format */ transformRequest(anthropicRequest: AnthropicRequest): TransformResult; /** Transform OpenAI response to Anthropic format */ transformResponse(openaiResponse: OpenAIResponse, _thinkingConfig?: ThinkingConfig): AnthropicResponse; /** Transform streaming delta (delegates to StreamParser) */ transformDelta(openaiEvent: SSEEvent, accumulator: DeltaAccumulator): AnthropicSSEEvent[]; /** Finalize streaming (delegates to StreamParser) */ finalizeDelta(accumulator: DeltaAccumulator): AnthropicSSEEvent[]; private writeDebugLog; private log; /** Generate thinking signature (delegates to ResponseBuilder) */ generateThinkingSignature(thinking: string): ThinkingSignature; /** Map stop reason (delegates to ResponseBuilder) */ mapStopReason(openaiReason: string): string; /** Detect think keywords (delegates to ContentTransformer) */ detectThinkKeywords(messages: Message[]): { thinking: boolean; effort: string; keyword: string; } | null; /** Validate transformation result */ validateTransformation(anthropicResponse: AnthropicResponse): ValidationResult; } export default GlmtTransformer; //# sourceMappingURL=glmt-transformer.d.ts.map