import { type ChatSessionLeaseOwner } from '../../../../core/chat/engine/sessions/leases/index.js';
import type { ChatSession } from '../../../../core/chat/types.js';
import type { NormalizedConversationEngineConfig } from '../config.js';
import type { AppendConversationMessageInput, AcceptConversationUserMessageInput, AutoRenameConversationSessionInput, AutoRenameConversationSessionResult, DeleteQueuedConversationPromptInput, DequeuedConversationPromptResult, EnqueueConversationPromptInput, ApplyConversationCompactionResultInput, ConversationSessionService, CreateConversationSessionInput, MarkAcceptedConversationUserMessageFailedInput, MarkAcceptedConversationUserMessageInput, MarkConversationCompactionRunningInput, RestoreConversationCompactionStateInput, QueuedConversationPromptResult, UpdateConversationSessionSettingsInput, UpdateQueuedConversationPromptInput } from '../types.js';
import type { ConversationSessionServiceConfig } from './types.js';
export declare class FileConversationSessionService implements ConversationSessionService {
    private readonly repository;
    private readonly config;
    constructor(config: NormalizedConversationEngineConfig | ConversationSessionServiceConfig);
    static summarize(session: ChatSession): string;
    list(): ChatSession[];
    listExisting(): ChatSession[];
    read(id: string): ChatSession | undefined;
    require(id: string): ChatSession;
    latest(): ChatSession | undefined;
    latestExisting(): ChatSession | undefined;
    create(input?: CreateConversationSessionInput): ChatSession;
    createOneOff(input?: CreateConversationSessionInput): ChatSession;
    update(id: string, updater: (session: ChatSession) => ChatSession): ChatSession | undefined;
    updateSettings(id: string, input: UpdateConversationSessionSettingsInput): ChatSession;
    appendMessage(id: string, input: AppendConversationMessageInput): ChatSession;
    appendMessages(id: string, inputs: AppendConversationMessageInput[]): ChatSession;
    markAcceptedUserMessage(id: string, input: MarkAcceptedConversationUserMessageInput): ChatSession;
    acceptUserMessage(id: string, input: AcceptConversationUserMessageInput): ChatSession;
    markAcceptedUserMessageFailed(id: string, input: MarkAcceptedConversationUserMessageFailedInput): ChatSession;
    enqueuePrompt(id: string, input: EnqueueConversationPromptInput): QueuedConversationPromptResult;
    updateQueuedPrompt(id: string, input: UpdateQueuedConversationPromptInput): ChatSession;
    deleteQueuedPrompt(id: string, input: DeleteQueuedConversationPromptInput): ChatSession;
    dequeueQueuedPrompt(id: string): DequeuedConversationPromptResult;
    resetConversation(id: string): ChatSession;
    setLastContinuePrompt(id: string, prompt: string | undefined): ChatSession;
    markCompactionRunning(id: string, input: MarkConversationCompactionRunningInput): ChatSession;
    applyCompactionResult(id: string, input: ApplyConversationCompactionResultInput): ChatSession;
    restoreCompactionState(id: string, input: RestoreConversationCompactionStateInput): ChatSession;
    setDriftEnabled(id: string, enabled: boolean): ChatSession;
    getLeaseConflict(id: string, owner: ChatSessionLeaseOwner): string | undefined;
    acquireLease(id: string, owner: ChatSessionLeaseOwner): ChatSession;
    refreshLease(id: string, owner: Pick<ChatSessionLeaseOwner, 'ownerId'>): ChatSession;
    releaseLease(id: string, owner: Pick<ChatSessionLeaseOwner, 'ownerId'>): ChatSession;
    rename(id: string, name: string): ChatSession;
    setPinned(id: string, pinned: boolean): ChatSession;
    setArchived(id: string, archived: boolean): ChatSession;
    autoRenameAfterFirstUserMessage(id: string, input: AutoRenameConversationSessionInput): Promise<AutoRenameConversationSessionResult>;
    delete(id: string): boolean;
    private loadSessions;
    private static activeSessions;
    private loadExistingSessions;
    private readSession;
    private updateRequiredSession;
    private createFallbackSession;
    private static applySettings;
    private static normalizeConfig;
    private static getNextSessionNumber;
}
//# sourceMappingURL=service.d.ts.map