/**
 * Memory consolidation (retire-Rust RES-4b; port of engine compress.rs `consolidate`). The D2 safety
 * contract: compress a window → Mc, VERIFY (recall-replay) that Mc preserves each predecessor's
 * recall, and ONLY THEN force-delete the NON-immune predecessors. Fail-closed on ANY uncertainty
 * (recall_k==0, a vanished predecessor, a search error, or Mc absent from the top-k) → delete
 * NOTHING; Mc lives alongside the originals and the caller surfaces drift.
 *
 * The citation-counter immunity (`consumed_by_user_lessons > 0`) is checked HERE, re-loaded right
 * before the irreversible delete — NOT delegated to the force-delete (which would bypass it). The
 * delete MUST go through the backend `deleteLesson(force:true)` so the per-file source is removed too;
 * a DB-only delete would let `rebuildLibsqlIndex` resurrect the predecessor, undoing the consolidation.
 *
 * Imports from: ./compress.js.
 * Imported by: RES-4c (the compression orchestrator) — not yet wired.
 */
import { type CompressDeps } from './compress.js';
/** Top-k for the recall-replay probe — engine DEFAULT_CONSOLIDATE_RECALL_K (compress.rs:252). */
export declare const DEFAULT_CONSOLIDATE_RECALL_K = 5;
export interface ConsolidateDeps extends CompressDeps {
    /** Backend recall → the hit ids (e.g. `recall(q,k).then(hs => hs.map(h => h.lesson.id))`). */
    recallIds: (query: string, k: number) => Promise<string[]>;
    /** Backend `deleteLesson(id, {force:true})` — removes the per-file source too (NOT a DB-only delete). */
    deleteMemory: (id: string) => Promise<void>;
}
export interface ConsolidateOutcome {
    mcId: string;
    deleted: string[];
    keptImmune: string[];
    verified: boolean;
}
export declare function consolidate(deps: ConsolidateDeps, ids: string[], recallK?: number): Promise<ConsolidateOutcome>;
//# sourceMappingURL=consolidate.d.ts.map