import type { KnowledgeCandidate, KnowledgeMaintenanceRunRecord, MemoryMaintenanceLockRecord } from './types.js';
/**
 * Owns memory maintenance JSONL files and lock-file persistence.
 */
export declare class MemoryMaintenanceRepository {
    private readonly memoryRoot;
    constructor(memoryRoot: string);
    readPendingCandidates(): Promise<KnowledgeCandidate[]>;
    appendCandidate(candidate: KnowledgeCandidate): Promise<void>;
    appendCandidateStatusEvents(candidateIds: string[], runId: string, now: () => Date): Promise<void>;
    appendMaintenanceRun(run: KnowledgeMaintenanceRunRecord): Promise<void>;
    readRecentMaintenanceRuns(limit?: number): Promise<KnowledgeMaintenanceRunRecord[]>;
    writeLock(lockPath: string, record: MemoryMaintenanceLockRecord): Promise<void>;
    readLock(lockPath: string): Promise<MemoryMaintenanceLockRecord | undefined>;
    removeLock(lockPath: string): Promise<void>;
    maintenanceLockPath(): string;
    private readCandidateLogEntries;
    private candidatesPath;
    private runsPath;
    private appendJsonLine;
    private appendJsonLines;
    private readJsonlLines;
    private parseCandidateLogEntry;
    private parseMaintenanceRun;
    private resolveRoot;
}
//# sourceMappingURL=maintenance-repository.d.ts.map