import type { MastraDBMessage, StorageThreadType } from '../../../memory/types.js'; import type { StorageMessageType, StorageResourceType, StorageListMessagesInput, StorageListMessagesByResourceIdInput, StorageListMessagesOutput, StorageListThreadsInput, StorageListThreadsOutput, StorageCloneThreadInput, StorageCloneThreadOutput, ObservationalMemoryRecord, ObservationalMemoryHistoryOptions, CreateObservationalMemoryInput, UpdateActiveObservationsInput, UpdateBufferedObservationsInput, UpdateBufferedReflectionInput, SwapBufferedToActiveInput, SwapBufferedToActiveResult, SwapBufferedReflectionToActiveInput, CreateReflectionGenerationInput, UpdateObservationalMemoryConfigInput } from '../../types.js'; import type { InMemoryDB } from '../inmemory-db.js'; import { MemoryStorage } from './base.js'; export declare class InMemoryMemory extends MemoryStorage { readonly supportsObservationalMemory = true; private db; constructor({ db }: { db: InMemoryDB; }); dangerouslyClearAll(): Promise; getThreadById({ threadId }: { threadId: string; }): Promise; saveThread({ thread }: { thread: StorageThreadType; }): Promise; updateThread({ id, title, metadata, }: { id: string; title: string; metadata: Record; }): Promise; deleteThread({ threadId }: { threadId: string; }): Promise; listMessages({ threadId, resourceId: optionalResourceId, include, filter, perPage: perPageInput, page, orderBy, }: StorageListMessagesInput): Promise; listMessagesByResourceId({ resourceId, filter, perPage: perPageInput, page, orderBy, }: StorageListMessagesByResourceIdInput): Promise; protected parseStoredMessage(message: StorageMessageType): MastraDBMessage; listMessagesById({ messageIds }: { messageIds: string[]; }): Promise<{ messages: MastraDBMessage[]; }>; saveMessages(args: { messages: MastraDBMessage[]; }): Promise<{ messages: MastraDBMessage[]; }>; updateMessages(args: { messages: (Partial & { id: string; })[]; }): Promise; deleteMessages(messageIds: string[]): Promise; listThreads(args: StorageListThreadsInput): Promise; getResourceById({ resourceId }: { resourceId: string; }): Promise; saveResource({ resource }: { resource: StorageResourceType; }): Promise; updateResource({ resourceId, workingMemory, metadata, }: { resourceId: string; workingMemory?: string; metadata?: Record; }): Promise; cloneThread(args: StorageCloneThreadInput): Promise; private sortThreads; private getObservationalMemoryKey; getObservationalMemory(threadId: string | null, resourceId: string): Promise; getObservationalMemoryHistory(threadId: string | null, resourceId: string, limit?: number, options?: ObservationalMemoryHistoryOptions): Promise; initializeObservationalMemory(input: CreateObservationalMemoryInput): Promise; insertObservationalMemoryRecord(record: ObservationalMemoryRecord): Promise; updateActiveObservations(input: UpdateActiveObservationsInput): Promise; updateBufferedObservations(input: UpdateBufferedObservationsInput): Promise; swapBufferedToActive(input: SwapBufferedToActiveInput): Promise; createReflectionGeneration(input: CreateReflectionGenerationInput): Promise; updateBufferedReflection(input: UpdateBufferedReflectionInput): Promise; swapBufferedReflectionToActive(input: SwapBufferedReflectionToActiveInput): Promise; setReflectingFlag(id: string, isReflecting: boolean): Promise; setObservingFlag(id: string, isObserving: boolean): Promise; setBufferingObservationFlag(id: string, isBuffering: boolean, lastBufferedAtTokens?: number): Promise; setBufferingReflectionFlag(id: string, isBuffering: boolean): Promise; clearObservationalMemory(threadId: string | null, resourceId: string): Promise; setPendingMessageTokens(id: string, tokenCount: number): Promise; updateObservationalMemoryConfig(input: UpdateObservationalMemoryConfigInput): Promise; /** * Helper to find an observational memory record by ID across all keys */ private findObservationalMemoryRecordById; } //# sourceMappingURL=inmemory.d.ts.map