/**
 * `derived_from` cycle + depth detection for memory compression (retire-Rust RES-4a; port of
 * engine/src/engine/memory/cycle.rs). Walks each predecessor's `derived_from` chain with an
 * iterative DFS that tracks the CURRENT PATH (not all-visited), so legitimate diamond DAGs (the
 * same ancestor reachable via two branches) don't false-positive as cycles. A back-edge onto the
 * current path is a true cycle; exceeding the depth cap is treated the same (CompressionCycleError).
 * The walk loads parents lazily; an absent predecessor is skipped (compress() validates existence).
 *
 * Imports from: nothing (pure — takes a parent-lookup fn).
 * Imported by: src/rag/memory/compress.ts.
 */
/** Depth cap for the derived_from chain walk (engine compress.rs COMPRESSION_MAX_CHAIN_DEPTH). */
export declare const COMPRESSION_MAX_CHAIN_DEPTH = 16;
export declare class CompressionCycleError extends Error {
    readonly chain: string[];
    constructor(chain: string[]);
}
/**
 * Throw `CompressionCycleError` if any `derived_from` chain rooted at `rootIds` contains a cycle or
 * exceeds the depth cap; resolve otherwise. `getDerivedFrom(id)` returns the parent ids, or `null`
 * when the memory is absent (skipped).
 */
export declare function detectCycleInWindow(getDerivedFrom: (id: string) => Promise<string[] | null>, rootIds: string[]): Promise<void>;
//# sourceMappingURL=cycle.d.ts.map