import type { ProviderMessage, ContentPart } from '../providers/interface.js';
import type { ToolCall, ToolResult } from '@pellux/goodvibes-sdk/platform/types/tools';
import type { ProviderRegistry } from '../providers/registry.js';
import type { CompactionContext } from './context-compaction.js';
import type { SessionMemoryStore } from '@pellux/goodvibes-sdk/platform/core/session-memory';
import type { SessionLineageTracker } from '@pellux/goodvibes-sdk/platform/core/session-lineage';
export type TokenUsage = {
    inputTokens: number;
    outputTokens: number;
    cacheReadTokens?: number;
    cacheWriteTokens?: number;
};
type AssistantMessage = {
    role: 'assistant';
    content: string;
    toolCalls?: ToolCall[];
    reasoningContent?: string;
    reasoningSummary?: string;
    usage?: TokenUsage;
    model?: string;
    provider?: string;
};
export type ConversationMessageSnapshot = {
    role: 'user';
    content: string | ContentPart[];
    cancelled?: boolean;
} | AssistantMessage | {
    role: 'system';
    content: string;
} | {
    role: 'tool';
    callId: string;
    content: string;
    toolName?: string;
};
type Message = ConversationMessageSnapshot;
export type ConversationTitleSource = 'system' | 'user';
export interface BlockMeta {
    blockIndex: number;
    type: 'tool' | 'code' | 'diff' | 'thinking';
    startLine: number;
    lineCount: number;
    rawContent: string;
    collapseKey: string;
    filePath?: string;
    diffOriginal?: string;
    diffUpdated?: string;
}
export declare class ConversationManager {
    private messages;
    private _title;
    private _titleSource;
    private sessionMemoryStore;
    private sessionLineageTracker;
    private branches;
    private currentBranch;
    private streamingMessageIndex;
    constructor(_getWidth?: () => number, _configManager?: unknown);
    private findToolName;
    setSessionMemoryStore(store: Pick<SessionMemoryStore, 'list'>): void;
    getSessionMemoryStore(): Pick<SessionMemoryStore, 'list'> | null;
    setSessionLineageTracker(tracker: Pick<SessionLineageTracker, 'addCompactionEntry'>): void;
    getSessionLineageTracker(): Pick<SessionLineageTracker, 'addCompactionEntry'>;
    getMessagesForLLM(): ProviderMessage[];
    addUserMessage(content: string | ContentPart[]): void;
    addAssistantMessage(content: string, opts?: {
        toolCalls?: ToolCall[];
        reasoningContent?: string;
        reasoningSummary?: string;
        usage?: TokenUsage;
        model?: string;
        provider?: string;
    }): void;
    addToolResults(results: ToolResult[]): void;
    addSystemMessage(content: string): void;
    getLastUserMessage(): string | null;
    getMessageCount(): number;
    removeMessagesAfter(count: number): void;
    markLastUserMessageCancelled(): void;
    startStreamingBlock(): void;
    updateStreamingBlock(content: string): void;
    finalizeStreamingBlock(): void;
    getMessageSnapshot(): ConversationMessageSnapshot[];
    getTranscriptEventIndex(): {
        events: import("./transcript-events/types.js").TranscriptEvent[];
        groups: import("./transcript-events/grouping.js").TranscriptEventGroup[];
    };
    replaceMessagesForLLM(newMessages: ProviderMessage[]): void;
    compact(registry: ProviderRegistry, modelId: string, trigger?: 'auto' | 'manual', provider?: string, context?: CompactionContext): Promise<void>;
    get title(): string;
    set title(value: string);
    getTitleSource(): ConversationTitleSource;
    setSystemTitle(value: string): void;
    resetAll(): void;
    forkBranch(name?: string, force?: boolean): string;
    listBranches(): Array<{
        name: string;
        messageCount: number;
        isCurrent: boolean;
    }>;
    switchBranch(name: string): boolean;
    mergeBranch(name: string): boolean;
    getCurrentBranch(): string;
    toJSON(): object;
    fromJSON(data: {
        messages: Message[];
        branches?: Record<string, Message[]>;
        currentBranch?: string;
        title?: string;
        titleSource?: ConversationTitleSource;
    }): void;
}
export { parseDiffForApply, applyDiffContent } from './conversation-diff.js';
//# sourceMappingURL=conversation.d.ts.map