import type { Message, ContentPart, ToolCall } from './types'; /** * Manages message history for LLM conversations */ export declare class MessageManager { private messages; /** * Create a new MessageManager * @param initialMessages - Optional initial messages to populate history */ constructor(initialMessages?: Message[]); /** * Add a system message to the history * @param content - The system prompt content */ addSystem(content: string): void; /** * Add a user message to the history * @param content - The user message content (string or ContentPart array for multimodal) */ addUser(content: string | ContentPart[]): void; /** * Add an assistant message to the history * @param content - The assistant response content * @param toolCalls - Optional tool calls made by the assistant */ addAssistant(content: string, toolCalls?: ToolCall[]): void; /** * Add a tool result message to the history * @param toolCallId - The ID of the tool call this result responds to * @param result - The result of the tool execution (will be stringified if not a string) */ addToolResult(toolCallId: string, result: string): void; /** * Get all messages in the history * @returns A copy of the message array */ getMessages(): Message[]; /** * Clear all messages from the history */ clear(): void; /** * Get the number of messages in the history */ get length(): number; /** * Serialize the message history to JSON * @returns The message array */ toJSON(): Message[]; /** * Create a MessageManager from serialized JSON * @param messages - The serialized message array * @returns A new MessageManager instance */ static fromJSON(messages: Message[]): MessageManager; } //# sourceMappingURL=message-manager.d.ts.map