import type { OpenClawConfig } from "../config/config.js"; import type { MemoryEmbeddingProbeResult, MemoryProviderStatus, MemorySearchManager, MemorySearchResult, MemorySyncProgressUpdate } from "./types.js"; export declare class MemoryIndexManager implements MemorySearchManager { private readonly cacheKey; private readonly cfg; private readonly agentId; private readonly workspaceDir; private readonly settings; private provider; private readonly requestedProvider; private fallbackFrom?; private fallbackReason?; private openAi?; private gemini?; private voyage?; private batch; private batchFailureCount; private batchFailureLastError?; private batchFailureLastProvider?; private batchFailureLock; private db; private readonly sources; private providerKey; private readonly cache; private readonly vector; private readonly fts; private vectorReady; private watcher; private watchTimer; private sessionWatchTimer; private sessionUnsubscribe; private intervalTimer; private closed; private dirty; private sessionsDirty; private sessionsDirtyFiles; private sessionPendingFiles; private sessionDeltas; private sessionWarm; private syncing; static get(params: { cfg: OpenClawConfig; agentId: string; }): Promise; private constructor(); warmSession(sessionKey?: string): Promise; search(query: string, opts?: { maxResults?: number; minScore?: number; sessionKey?: string; }): Promise; private searchVector; private buildFtsQuery; private searchKeyword; private mergeHybridResults; sync(params?: { reason?: string; force?: boolean; progress?: (update: MemorySyncProgressUpdate) => void; }): Promise; readFile(params: { relPath: string; from?: number; lines?: number; }): Promise<{ text: string; path: string; }>; status(): MemoryProviderStatus; probeVectorAvailability(): Promise; probeEmbeddingAvailability(): Promise; close(): Promise; private ensureVectorReady; private loadVectorExtension; private ensureVectorTable; private dropVectorTable; private buildSourceFilter; private openDatabase; private openDatabaseAtPath; private seedEmbeddingCache; private swapIndexFiles; private moveIndexFiles; private removeIndexFiles; private ensureSchema; private ensureWatcher; private ensureSessionListener; private scheduleSessionDirty; private processSessionDeltaBatch; private updateSessionDelta; private countNewlines; private resetSessionDelta; private isSessionFileForAgent; private ensureIntervalSync; private scheduleWatchSync; private shouldSyncSessions; private syncMemoryFiles; private syncSessionFiles; private createSyncProgress; private runSync; private shouldFallbackOnError; private resolveBatchConfig; private activateFallbackProvider; private runSafeReindex; private resetIndex; private readMeta; private writeMeta; private buildEmbeddingBatches; private loadEmbeddingCache; private upsertEmbeddingCache; private pruneEmbeddingCacheIfNeeded; private embedChunksInBatches; private computeProviderKey; private embedChunksWithBatch; private embedChunksWithVoyageBatch; private embedChunksWithOpenAiBatch; private embedChunksWithGeminiBatch; private embedBatchWithRetry; private isRetryableEmbeddingError; private resolveEmbeddingTimeout; private embedQueryWithTimeout; private withTimeout; private withBatchFailureLock; private resetBatchFailureCount; private recordBatchFailure; private isBatchTimeoutError; private runBatchWithTimeoutRetry; private runBatchWithFallback; private getIndexConcurrency; private indexFile; }