import { OpenRouterConfig, OpenRouterRequestOptions, Message, Tool, UserAuthInfo, ChatCompletionResult, // Now includes toolCalls?: ToolCallDetail[] CreditBalance, ApiKeyInfo, ModelPricingInfo, OpenRouterPlugin, MiddlewareFunction, ToolCall, StreamCallbacks, ChatStreamResult } from './types'; import { SecurityManager } from './security/security-manager'; import { CostTracker } from './cost-tracker'; import { UnifiedHistoryManager } from './history/unified-history-manager'; import { HistoryAnalyzer } from './history/history-analyzer'; export declare class OpenRouterClient { private config; private logger; private clientEventEmitter; private apiHandler; private chatProcessor; private pluginManager; private unifiedHistoryManager; private securityManager; private costTracker; private historyAnalyzer; private currentModel; constructor(config: OpenRouterConfig); private _initializeHistoryManager; private _initializeSecurityManager; private _initializeCostTracker; chat(options: OpenRouterRequestOptions): Promise; private _getHistoryKey; private _handleError; getHistoryManager(): UnifiedHistoryManager; getHistoryAnalyzer(): HistoryAnalyzer; isDebugMode(): boolean; getSecurityManager(): SecurityManager | null; isSecurityEnabled(): boolean; getCostTracker(): CostTracker | null; getDefaultModel(): string; setModel(model: string): void; setApiKey(apiKey: string): void; createAccessToken(userInfo: Omit, expiresIn?: string | number): string; getCreditBalance(): Promise; getApiKeyInfo(): Promise; getModelPrices(): Record; refreshModelPrices(): Promise; on(event: string, handler: (event: any) => void): this; off(event: string, handler: (event: any) => void): this; destroy(): Promise; chatStream(options: OpenRouterRequestOptions & { streamCallbacks?: StreamCallbacks; }, abortSignal?: AbortSignal): Promise; use(plugin: OpenRouterPlugin): Promise; useMiddleware(fn: MiddlewareFunction): void; /** @internal */ setSecurityManager(securityManager: SecurityManager | null): void; /** @internal */ setCostTracker(costTracker: CostTracker | null): void; /** @deprecated Tool processing is now integrated into client.chat(). Use the main chat method instead. */ handleToolCalls(params: { message: Message & { tool_calls?: ToolCall[]; }; messages: Message[]; tools?: Tool[]; debug?: boolean; accessToken?: string; }): Promise; }