import type { AIMessage, RAGCitation, RAGSource, RAGSourceGroup, RAGStreamStage } from '../../../types/ai';
export declare const getLatestAssistantMessage: (messages: AIMessage[]) => AIMessage | undefined;
export declare const getLatestRAGSources: (messages: AIMessage[]) => RAGSource[];
export declare const buildRAGSourceGroups: (sources: RAGSource[]) => RAGSourceGroup[];
export declare const buildRAGCitations: (sources: RAGSource[]) => RAGCitation[];
export declare const resolveRAGStreamStage: ({ error, isStreaming, messages }: {
    error: string | null;
    isStreaming: boolean;
    messages: AIMessage[];
}) => RAGStreamStage;
