import { Message, UserAuthInfo, OpenRouterRequestOptions, UsageInfo, ApiCallMetadata, UrlCitationAnnotation, ToolCallDetail } from '../types'; import { ApiHandler } from './api-handler'; import { UnifiedHistoryManager } from '../history/unified-history-manager'; import { SecurityManager } from '../security/security-manager'; import { CostTracker } from '../cost-tracker'; import { Logger } from '../utils/logger'; interface HandleApiResponseResult { content: any; usage: UsageInfo | null; model: string; toolCallsCount: number; toolCalls?: ToolCallDetail[]; finishReason: string | null; id?: string; cost?: number | null; reasoning?: string | null; annotations?: UrlCitationAnnotation[]; apiCallMetadata: ApiCallMetadata | null; newlyAddedMessages: Message[]; } interface ChatProcessorDependencies { apiHandler: ApiHandler; historyManager: UnifiedHistoryManager; securityManager: SecurityManager | null; costTracker: CostTracker | null; logger: Logger; filterMessagesForApi: (messages: Message[]) => Message[]; } interface ChatProcessorConfig { defaultModel: string; defaultMaxToolCalls: number; defaultStrictJsonParsing: boolean; debug: boolean; } export declare class ChatProcessor { private apiHandler; private historyManager; private securityManager; private costTracker; private logger; private config; private filterMessagesForApi; constructor(dependencies: ChatProcessorDependencies, config: ChatProcessorConfig); processChat(params: { initialMessages: Message[]; requestOptions: OpenRouterRequestOptions; userInfo: UserAuthInfo | null; }): Promise; private _handleApiResponseInternal; private _parseAndValidateJsonResponse; } export {};