import type { MastraMessageContentV2 } from '@mastra/core/agent';
import type { MastraDBMessage, StorageThreadType } from '@mastra/core/memory';
import type { StorageResourceType, StorageListMessagesInput, StorageListMessagesByResourceIdInput, StorageListMessagesOutput, StorageListThreadsInput, StorageListThreadsOutput, StorageCloneThreadInput, StorageCloneThreadOutput, ObservationalMemoryRecord, ObservationalMemoryHistoryOptions, CreateObservationalMemoryInput, UpdateActiveObservationsInput, UpdateBufferedObservationsInput, SwapBufferedToActiveInput, SwapBufferedToActiveResult, UpdateBufferedReflectionInput, SwapBufferedReflectionToActiveInput, CreateReflectionGenerationInput, UpdateObservationalMemoryConfigInput } from '@mastra/core/storage';
import { MemoryStorage } from '@mastra/core/storage';
import type { LibSQLDomainConfig } from '../../db/index.js';
export declare class MemoryLibSQL extends MemoryStorage {
    #private;
    readonly supportsObservationalMemory = true;
    constructor(config: LibSQLDomainConfig);
    init(): Promise<void>;
    dangerouslyClearAll(): Promise<void>;
    private parseRow;
    private _sortMessages;
    private _getIncludedMessages;
    listMessagesById({ messageIds }: {
        messageIds: string[];
    }): Promise<{
        messages: MastraDBMessage[];
    }>;
    listMessages(args: StorageListMessagesInput): Promise<StorageListMessagesOutput>;
    listMessagesByResourceId(args: StorageListMessagesByResourceIdInput): Promise<StorageListMessagesOutput>;
    saveMessages({ messages }: {
        messages: MastraDBMessage[];
    }): Promise<{
        messages: MastraDBMessage[];
    }>;
    updateMessages({ messages, }: {
        messages: (Partial<Omit<MastraDBMessage, 'createdAt'>> & {
            id: string;
            content?: {
                metadata?: MastraMessageContentV2['metadata'];
                content?: MastraMessageContentV2['content'];
            };
        })[];
    }): Promise<MastraDBMessage[]>;
    deleteMessages(messageIds: string[]): Promise<void>;
    getResourceById({ resourceId }: {
        resourceId: string;
    }): Promise<StorageResourceType | null>;
    saveResource({ resource }: {
        resource: StorageResourceType;
    }): Promise<StorageResourceType>;
    updateResource({ resourceId, workingMemory, metadata, }: {
        resourceId: string;
        workingMemory?: string;
        metadata?: Record<string, unknown>;
    }): Promise<StorageResourceType>;
    getThreadById({ threadId, resourceId, }: {
        threadId: string;
        resourceId?: string;
    }): Promise<StorageThreadType | null>;
    listThreads(args: StorageListThreadsInput): Promise<StorageListThreadsOutput>;
    saveThread({ thread }: {
        thread: StorageThreadType;
    }): Promise<StorageThreadType>;
    updateThread({ id, title, metadata, }: {
        id: string;
        title: string;
        metadata: Record<string, unknown>;
    }): Promise<StorageThreadType>;
    deleteThread({ threadId }: {
        threadId: string;
    }): Promise<void>;
    cloneThread(args: StorageCloneThreadInput): Promise<StorageCloneThreadOutput>;
    private getOMKey;
    private parseOMRow;
    getObservationalMemory(threadId: string | null, resourceId: string): Promise<ObservationalMemoryRecord | null>;
    getObservationalMemoryHistory(threadId: string | null, resourceId: string, limit?: number, options?: ObservationalMemoryHistoryOptions): Promise<ObservationalMemoryRecord[]>;
    initializeObservationalMemory(input: CreateObservationalMemoryInput): Promise<ObservationalMemoryRecord>;
    insertObservationalMemoryRecord(record: ObservationalMemoryRecord): Promise<void>;
    updateActiveObservations(input: UpdateActiveObservationsInput): Promise<void>;
    createReflectionGeneration(input: CreateReflectionGenerationInput): Promise<ObservationalMemoryRecord>;
    setReflectingFlag(id: string, isReflecting: boolean): Promise<void>;
    setObservingFlag(id: string, isObserving: boolean): Promise<void>;
    setBufferingObservationFlag(id: string, isBuffering: boolean, lastBufferedAtTokens?: number): Promise<void>;
    setBufferingReflectionFlag(id: string, isBuffering: boolean): Promise<void>;
    clearObservationalMemory(threadId: string | null, resourceId: string): Promise<void>;
    setPendingMessageTokens(id: string, tokenCount: number): Promise<void>;
    updateObservationalMemoryConfig(input: UpdateObservationalMemoryConfigInput): Promise<void>;
    updateBufferedObservations(input: UpdateBufferedObservationsInput): Promise<void>;
    swapBufferedToActive(input: SwapBufferedToActiveInput): Promise<SwapBufferedToActiveResult>;
    updateBufferedReflection(input: UpdateBufferedReflectionInput): Promise<void>;
    swapBufferedReflectionToActive(input: SwapBufferedReflectionToActiveInput): Promise<ObservationalMemoryRecord>;
}
//# sourceMappingURL=index.d.ts.map