import type { Message, TokenUsage, ToolCall, ToolDefinition, ExecuteToolResult, SerializedContext } from "./types.js"; export declare class Context { private systemMessage?; private messages; private tools; setSystemMessage(message: string): void; getSystemMessage(): string | undefined; addMessage(message: Message): void; getMessages(): Message[]; getLastMessage(): Message | undefined; clear(): void; clone(): Context; getTotalCost(): number; getTokenUsage(): TokenUsage; getCostByProvider(): Record; getCostByModel(): Record; getTokensByProvider(): Record; getTokensByModel(): Record; private findModelData; addTool, R = unknown>(tool: ToolDefinition): void; getTool(name: string): ToolDefinition | undefined; listTools(): ToolDefinition[]; executeTool(toolCall: ToolCall): Promise; /** * Execute multiple tools in parallel * @param toolCalls Array of tool calls to execute * @returns Promise resolving to array of results in the same order */ executeTools(toolCalls: ToolCall[]): Promise; /** * Serialize context to JSON-compatible format * @returns Serialized context with JSON schemas for tools */ serialize(): SerializedContext; /** * Deserialize context from JSON-compatible format * @param serialized Serialized context data * @param tools Array of tool definitions to restore (must match serialized tools) * @returns New Context instance with restored data * @throws Error if a serialized tool cannot be matched with provided tools */ static deserialize(serialized: SerializedContext, tools?: ToolDefinition[]): Context; } //# sourceMappingURL=context.d.ts.map