import type { AiSdkMessage, AiSdkMessageV4, AiSdkMessageV5, ChatMessageWithSource } from "./types"; /** * Type guard to check if a message is in AI SDK v4.0 format. * @param message - The message to check * @returns True if the message is in v4.0 format (has string content property) */ export declare const isAiSdkMessageV4: (message: AiSdkMessage) => message is AiSdkMessageV4; /** * Type guard to check if a message is in AI SDK v5.0 format. * @param message - The message to check * @returns True if the message is in v5.0 format (has parts array) */ export declare const isAiSdkMessageV5: (message: AiSdkMessage) => message is AiSdkMessageV5; /** * Converts an AI SDK message (v4.0 or v5.0) to the universal ChatMessage format. * For v4.0 messages, uses the content directly. * For v5.0 messages, extracts text from parts and joins them. * @param message - The AI SDK message to convert * @returns A ChatMessage with the original message as source */ export declare function convertAiSdkMessage(message: T): ChatMessageWithSource; /** * Converts an array of AI SDK messages to the universal ChatMessage format. * Filters out v4.0 data messages and converts the rest using convertAiSdkMessage. * @param messages - Array of AI SDK messages to convert * @returns Array of converted ChatMessages */ export declare function convertAiSdkMessages(messages: T[]): ChatMessageWithSource[];