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