/**
 * Conversation Branching and Merging (Items 106, 107)
 * Branch and merge conversation threads
 */
import { EventEmitter } from 'events';
export interface Message {
    id: string;
    role: 'user' | 'assistant' | 'system';
    content: string;
    timestamp: Date;
}
export interface ConversationBranch {
    id: string;
    name: string;
    parentBranchId: string | null;
    branchPointMessageId: string | null;
    messages: Message[];
    createdAt: Date;
    metadata: Record<string, unknown>;
}
export interface MergeResult {
    success: boolean;
    conflicts: MergeConflict[];
    mergedBranch: ConversationBranch;
}
export interface MergeConflict {
    messageId: string;
    sourceBranch: string;
    targetBranch: string;
    sourceContent: string;
    targetContent: string;
}
export declare class ConversationBranchManager extends EventEmitter {
    private branches;
    private currentBranchId;
    constructor();
    createBranch(name: string, parentBranchId: string | null, branchPointMessageId: string | null): ConversationBranch;
    switchBranch(branchId: string): ConversationBranch | null;
    getCurrentBranch(): ConversationBranch;
    addMessage(role: Message['role'], content: string): Message;
    branchFromMessage(messageId: string, newBranchName: string): ConversationBranch;
    mergeBranches(sourceBranchId: string, targetBranchId: string): MergeResult;
    deleteBranch(branchId: string): boolean;
    getBranches(): ConversationBranch[];
    getBranch(branchId: string): ConversationBranch | undefined;
    renameBranch(branchId: string, newName: string): boolean;
    getHistory(branchId: string): ConversationBranch[];
}
export declare function getConversationBranchManager(): ConversationBranchManager;
export default ConversationBranchManager;
