/**
 * Pre-Threshold Memory Flush + Plugin Memory Backends
 * Flushes context before compaction and supports pluggable memory backends.
 */
export interface SearchResult {
    key: string;
    value: string;
    score: number;
}
export interface MemoryBackend {
    name: string;
    search(query: string, limit?: number): SearchResult[];
    index(entries: Array<{
        key: string;
        value: string;
    }>): void;
    clear(): void;
}
export declare class PreThresholdFlusher {
    private static instance;
    private lastFlushTime;
    private flushCount;
    private flushPath;
    constructor(flushPath?: string);
    static getInstance(): PreThresholdFlusher;
    static resetInstance(): void;
    shouldFlush(currentTokens: number, maxTokens: number, threshold?: number): boolean;
    flush(context: {
        messages: unknown[];
        keyFacts: string[];
    }): {
        flushed: boolean;
        path: string;
    };
    getFlushPath(): string;
    getLastFlushTime(): number;
    getFlushCount(): number;
}
export declare class MemoryBackendManager {
    private static instance;
    private backends;
    private activeBackendName;
    constructor();
    static getInstance(): MemoryBackendManager;
    static resetInstance(): void;
    registerBackend(backend: MemoryBackend): void;
    getBackend(name: string): MemoryBackend | undefined;
    setActiveBackend(name: string): void;
    getActiveBackend(): MemoryBackend;
    listBackends(): string[];
}
