import type { MastraMessageContentV2 } from '@mastra/core/agent'; import type { MastraDBMessage, StorageThreadType } from '@mastra/core/memory'; import { MemoryStorage } from '@mastra/core/storage'; import type { StorageResourceType, StorageListMessagesInput, StorageListMessagesOutput, StorageListThreadsInput, StorageListThreadsOutput, StorageCloneThreadInput, StorageCloneThreadOutput } from '@mastra/core/storage'; import type { RedisDomainConfig } from '../../db/index.js'; export declare class StoreMemoryRedis extends MemoryStorage { readonly supportsPartialThreadUpdate = true; private client; private db; constructor(config: RedisDomainConfig); dangerouslyClearAll(): Promise; getThreadById({ threadId, resourceId, }: { threadId: string; resourceId?: string; }): Promise; listThreadsByResourceId(args: StorageListThreadsInput): Promise; listThreads(args: StorageListThreadsInput): Promise; saveThread({ thread }: { thread: StorageThreadType; }): Promise; updateThread({ id, title, metadata, }: { id: string; title?: string; metadata?: Record; }): Promise; deleteThread({ threadId }: { threadId: string; }): Promise; saveMessages(args: { messages: MastraDBMessage[]; }): Promise<{ messages: MastraDBMessage[]; }>; private getThreadIdForMessage; /** * Fetches the messages named by `include` together with their surrounding context. * * @param include - Message ids to pin, each with an optional before/after window. * @param resourceId - When set, drops any pinned or context message owned by another * resource so an id from another resource returns nothing. */ private getIncludedMessages; private parseStoredMessage; listMessagesById({ messageIds }: { messageIds: string[]; }): Promise<{ messages: MastraDBMessage[]; }>; listMessages(args: StorageListMessagesInput): Promise; getResourceById({ resourceId }: { resourceId: string; }): Promise; saveResource({ resource }: { resource: StorageResourceType; }): Promise; updateResource({ resourceId, workingMemory, metadata, }: { resourceId: string; workingMemory?: string; metadata?: Record; }): Promise; updateMessages(args: { messages: (Partial> & { id: string; content?: { metadata?: MastraMessageContentV2['metadata']; content?: MastraMessageContentV2['content']; }; })[]; }): Promise; deleteMessages(messageIds: string[]): Promise; private sortThreads; cloneThread(args: StorageCloneThreadInput): Promise; } //# sourceMappingURL=index.d.ts.map