import type { RuntimeTaskSessionSummary, RuntimeTaskTurnCheckpoint } from "../core/api-contract.js";
import type { ClinePersistedTaskSessionSnapshot } from "./cline-session-runtime.js";
import type { ClineSdkPersistedMessage } from "./sdk-runtime-boundary.js";
import { type ClineTaskMessage, type ClineTaskSessionEntry } from "./cline-session-state.js";
export interface ClineMessageRepository {
    onSummary(listener: (summary: RuntimeTaskSessionSummary) => void): () => void;
    onMessage(listener: (taskId: string, message: ClineTaskMessage) => void): () => void;
    setTaskEntry(taskId: string, entry: ClineTaskSessionEntry): void;
    getTaskEntry(taskId: string): ClineTaskSessionEntry | null;
    getSummary(taskId: string): RuntimeTaskSessionSummary | null;
    listSummaries(): RuntimeTaskSessionSummary[];
    listMessages(taskId: string): ClineTaskMessage[];
    hydrateTaskMessages(taskId: string, loadPersistedSession: () => Promise<ClinePersistedTaskSessionSnapshot | null>): Promise<ClineTaskMessage[]>;
    emitSummary(summary: RuntimeTaskSessionSummary): void;
    emitMessage(taskId: string, message: ClineTaskMessage): void;
    applyTurnCheckpoint(taskId: string, checkpoint: RuntimeTaskTurnCheckpoint): RuntimeTaskSessionSummary | null;
    dispose(): void;
}
export declare class InMemoryClineMessageRepository implements ClineMessageRepository {
    private readonly entries;
    private readonly hydratedMessagesByTaskId;
    private readonly summaryListeners;
    private readonly messageListeners;
    onSummary(listener: (summary: RuntimeTaskSessionSummary) => void): () => void;
    onMessage(listener: (taskId: string, message: ClineTaskMessage) => void): () => void;
    setTaskEntry(taskId: string, entry: ClineTaskSessionEntry): void;
    getTaskEntry(taskId: string): ClineTaskSessionEntry | null;
    getSummary(taskId: string): RuntimeTaskSessionSummary | null;
    listSummaries(): RuntimeTaskSessionSummary[];
    listMessages(taskId: string): ClineTaskMessage[];
    hydrateTaskMessages(taskId: string, loadPersistedSession: () => Promise<ClinePersistedTaskSessionSnapshot | null>): Promise<ClineTaskMessage[]>;
    emitSummary(summary: RuntimeTaskSessionSummary): void;
    emitMessage(taskId: string, message: ClineTaskMessage): void;
    applyTurnCheckpoint(taskId: string, checkpoint: RuntimeTaskTurnCheckpoint): RuntimeTaskSessionSummary | null;
    dispose(): void;
}
export declare function createInMemoryClineMessageRepository(): ClineMessageRepository;
export declare function createTaskEntryFromPersistedSession(taskId: string, messages: ClineSdkPersistedMessage[], summaryPatch?: Partial<RuntimeTaskSessionSummary>): ClineTaskSessionEntry;
//# sourceMappingURL=cline-message-repository.d.ts.map