import type Database from 'better-sqlite3';
export interface Conversation {
    id: string;
    squad_name: string;
    created_at: string;
}
export interface ChatMessage {
    id: string;
    conversation_id: string;
    role: 'user' | 'assistant' | 'agent_dm';
    content: string;
    agent_id: string | null;
    agent_name: string | null;
    created_at: string;
}
export interface PaginatedResult<T> {
    data: T[];
    nextCursor: string | null;
}
export declare function generateId(): string;
export declare function createConversation(db: Database.Database, squadName: string): Conversation;
export declare function getActiveConversation(db: Database.Database, squadName: string): Conversation | null;
export declare function getOrCreateConversation(db: Database.Database, squadName: string): {
    conversation: Conversation;
    created: boolean;
};
export interface InsertMessageParams {
    conversationId: string;
    role: 'user' | 'assistant' | 'agent_dm';
    content: string;
    agentId?: string;
    agentName?: string;
}
export declare function insertMessage(db: Database.Database, params: InsertMessageParams): ChatMessage;
export declare function getMessages(db: Database.Database, conversationId: string, opts: {
    limit: number;
    cursor?: string;
}): PaginatedResult<ChatMessage>;
export declare function getConversations(db: Database.Database, squadName: string, opts: {
    limit: number;
    cursor?: string;
}): PaginatedResult<Conversation>;
export declare function deleteConversation(db: Database.Database, conversationId: string): boolean;
export declare function getRecentMessages(db: Database.Database, conversationId: string, count: number): ChatMessage[];
//# sourceMappingURL=conversation.d.ts.map