import type { InstanceAiEnsureThreadResponse, InstanceAiRichMessagesResponse, InstanceAiThreadInfo, InstanceAiThreadListResponse, InstanceAiThreadMessagesResponse } from '@n8n/api-types'; import { Logger } from '@n8n/backend-common'; import { GlobalConfig } from '@n8n/config'; import { type AgentTreeSnapshot } from '@n8n/instance-ai'; import { DbSnapshotStorage } from './storage/db-snapshot-storage'; import { TypeORMCompositeStore } from './storage/typeorm-composite-store'; export declare class InstanceAiMemoryService { private readonly logger; private readonly compositeStore; private readonly dbSnapshotStorage; private readonly instanceAiConfig; constructor(logger: Logger, globalConfig: GlobalConfig, compositeStore: TypeORMCompositeStore, dbSnapshotStorage: DbSnapshotStorage); listThreads(userId: string, page?: number, perPage?: number): Promise; ensureThread(userId: string, threadId: string): Promise; getThreadMessages(userId: string, threadId: string, options?: { limit?: number; page?: number; }): Promise; getRichMessages(userId: string, threadId: string, options?: { limit?: number; page?: number; excludeRunIds?: string[]; }): Promise>; getLatestRunSnapshot(threadId: string, options?: { messageGroupId?: string; runId?: string; }): Promise; validateThreadOwnership(userId: string, threadId: string): Promise; checkThreadOwnership(userId: string, threadId: string): Promise<'owned' | 'not_found' | 'other_user'>; deleteThread(threadId: string): Promise; renameThread(threadId: string, title: string): Promise; updateThread(threadId: string, updates: { title?: string; metadata?: Record; }): Promise; getThreadMetadata(userId: string, threadId: string): Promise | undefined>; cleanupExpiredThreads(onThreadDeleted?: (threadId: string) => Promise): Promise; private createMemoryInstance; private toThreadInfo; }