export type MessageContentType = 'text' | 'image' | 'file'; export interface TextContent { type: 'text'; text: string; } export interface ImageContent { type: 'image'; source: { type: 'base64'; media_type: string; data: string; }; } export interface FileContent { type: 'file'; filename: string; media_type: string; data: string; } export type MessageContent = TextContent | ImageContent | FileContent; export interface Message { role: 'system' | 'user' | 'assistant' | 'tool' | 'tool_result'; content: string | MessageContent[]; name?: string; tool_call_id?: string; tool_calls?: ToolCall[]; metadata?: { model?: string; provider?: string; timestamp?: Date; tokens?: number; cost?: number; compacted?: boolean; }; } export interface Context { id: string; messages: Message[]; metadata: { created: Date; lastModified: Date; totalTokens: number; totalCost: number; modelsUsed: string[]; }; } export interface ContextStats { messageCount: number; tokenCount: number; totalCost: number; modelsUsed: string[]; oldestMessage: Date; newestMessage: Date; } export interface ModelProvider { name: string; models: string[]; supportsStreaming: boolean; supportsTools: boolean; complete(messages: Message[], options?: CompletionOptions): Promise; stream?(messages: Message[], options?: CompletionOptions): AsyncIterableIterator; calculateCost(usage: Usage, model?: string): Cost; } export interface CompletionOptions { model?: string; temperature?: number; maxTokens?: number; tools?: Tool[]; stream?: boolean; signal?: AbortSignal; } export interface CompletionResponse { content: string; usage: Usage; model: string; provider: string; toolCalls?: ToolCall[]; reasoning?: string; } export interface StreamChunk { delta: string; usage?: Usage; toolCall?: ToolCall; reasoning?: boolean; } export interface Usage { promptTokens: number; completionTokens: number; totalTokens: number; } export interface Cost { amount: number; currency: string; breakdown?: { prompt: number; completion: number; }; } export interface Tool { name: string; description: string; parameters: Record; execute: (params: any) => Promise; } export interface ToolCall { id: string; name: string; arguments: any; } export interface Config { auth?: { token?: string; email?: string; tier?: 'base' | 'super'; deviceId?: string; remainingRUs?: number; validUntil?: string; }; providers: { [key: string]: { apiKey?: string; baseUrl?: string; defaultModel?: string; enabled?: boolean; useManaged?: boolean; }; }; defaultProvider?: string; ui: { theme: 'dark' | 'light'; showCosts: boolean; animations: boolean; }; tools?: { fileOperations?: boolean; shellExecution?: boolean; webAccess?: boolean; }; costs: { trackUsage: boolean; budgetAlerts: boolean; monthlyLimit?: number; }; subAgentDefaults?: { model: string; provider: string; }; orchestratorPreferences?: { auto?: boolean; taskModels?: { [taskType: string]: { model: string; provider: string; }; }; }; services?: { googleSearch?: { apiKey?: string; searchEngineId?: string; }; serpApi?: { apiKey?: string; }; }; contexts?: any; cache?: { openrouterModels?: { models: any[]; timestamp: number; }; openrouterToolModels?: { models: any[]; timestamp: number; }; }; } //# sourceMappingURL=index.d.ts.map