import type { UnifiedSession } from "./unified" import type { ProviderPrompts } from "./prompts" import type { ConcurrencyConfig } from "./concurrency" export interface ProviderConfig { apiKey: string baseUrl?: string [key: string]: unknown } export interface IngestOptions { containerTag: string metadata?: Record } export interface SearchOptions { containerTag: string limit?: number threshold?: number } export interface IngestResult { documentIds: string[] taskIds?: string[] } export interface IndexingProgress { completedIds: string[] failedIds: string[] total: number } export type IndexingProgressCallback = (progress: IndexingProgress) => void export interface Provider { name: string prompts?: ProviderPrompts concurrency?: ConcurrencyConfig initialize(config: ProviderConfig): Promise ingest(sessions: UnifiedSession[], options: IngestOptions): Promise awaitIndexing( result: IngestResult, containerTag: string, onProgress?: IndexingProgressCallback ): Promise search(query: string, options: SearchOptions): Promise clear(containerTag: string): Promise } export type ProviderName = "supermemory" | "mem0" | "zep" | "filesystem" | "rag" | "cogmemai"