import { ModelMessage } from 'ai'; /** * A single conversation message, re-exported from the AI SDK so consumers of * this library never need to import `ai` types directly. */ type AiMessage = ModelMessage; /** * The input accepted by agent `.run()` / `.stream()` and the raw facade: either * a plain user string or an explicit list of messages. */ type AiInput = string | AiMessage[]; /** Normalizes a string or message list into a message array. */ declare function toMessages(input: AiInput): AiMessage[]; /** * Persistence contract for conversation history. Implement this interface to * back conversations with a database, cache, or any other store, then register * it through `AiModule.forRoot({ conversationStore })`. */ interface ConversationStore { /** Returns the ordered messages for a conversation (empty if unknown). */ load(conversationId: string): Promise; /** Appends messages to a conversation, preserving order. */ append(conversationId: string, messages: AiMessage[]): Promise; /** Removes all messages for a conversation. */ clear(conversationId: string): Promise; } export { type AiMessage as A, type ConversationStore as C, type AiInput as a, toMessages as t };