import { Database } from 'sqlite';
declare let db: Database;
export interface ConversationRecord {
    id: string;
    question: string;
    final_answer: string;
    source_of_truth: string;
    created_at: string;
    last_updated: string;
    metadata?: any;
}
export interface StageOutput {
    id: string;
    conversation_id: string;
    stage_name: 'generator' | 'refiner' | 'validator' | 'curator';
    stage_number: number;
    provider: string;
    model: string;
    full_output: string;
    character_count: number;
    word_count: number;
    temperature: number;
    processing_time_ms: number;
    created_at: string;
}
export interface KnowledgeEntry {
    id: string;
    conversation_id: string;
    curator_content: string;
    topics: string[];
    keywords: string[];
    semantic_embedding?: Buffer;
    is_source_of_truth: boolean;
    created_at: string;
}
/**
 * Initialize comprehensive database schema
 */
export declare function initializeComprehensiveDatabase(): Promise<boolean>;
/**
 * Store complete conversation with all stage outputs
 */
export declare function storeCompleteConversation(conversationId: string, question: string, stageOutputs: {
    generator: {
        content: string;
        provider: string;
        model: string;
        processingTime: number;
        temperature: number;
        tokens?: number;
    };
    refiner: {
        content: string;
        provider: string;
        model: string;
        processingTime: number;
        temperature: number;
        tokens?: number;
    };
    validator: {
        content: string;
        provider: string;
        model: string;
        processingTime: number;
        temperature: number;
        tokens?: number;
    };
    curator: {
        content: string;
        provider: string;
        model: string;
        processingTime: number;
        temperature: number;
        tokens?: number;
    };
}, finalAnswer: string, topics?: string[], keywords?: string[]): Promise<boolean>;
/**
 * Query conversation by ID with all stage outputs
 */
export declare function getCompleteConversation(conversationId: string): Promise<{
    conversation: ConversationRecord;
    stages: StageOutput[];
    knowledge: KnowledgeEntry;
} | null>;
/**
 * Search source of truth entries with temporal prioritization
 * Checks recent conversations first (past 24 hours) before doing broader search
 */
export declare function searchSourceOfTruth(query: string, limit?: number): Promise<KnowledgeEntry[]>;
/**
 * Get all conversations with basic info for browsing
 */
export declare function getAllConversations(): Promise<ConversationRecord[]>;
/**
 * Get conversation details by ID
 */
export declare function getConversationDetails(conversationId: string): Promise<ConversationRecord | null>;
/**
 * Get all stage outputs for a conversation
 */
export declare function getAllStageOutputs(conversationId: string): Promise<StageOutput[]>;
/**
 * Retrieve source of truth knowledge for a query
 */
export declare function retrieveSourceOfTruthKnowledge(query: string): Promise<string | null>;
export { db };
//# sourceMappingURL=comprehensive-database.d.ts.map