import type { SceneReport } from '../../agent/scene/types';
import type { SceneRouteProfile } from '../../agent/config/domainManifest';
export interface SceneReportStore {
    save(report: SceneReport, routeProfile?: SceneRouteProfile, options?: {
        indexByHash?: boolean;
    }): Promise<void>;
    loadById(reportId: string): Promise<SceneReport | null>;
    loadByHash(hash: string, routeProfile?: SceneRouteProfile): Promise<SceneReport | null>;
    delete(reportId: string): Promise<boolean>;
    cleanupExpired(nowMs: number): Promise<number>;
}
export declare class FileSystemSceneReportStore implements SceneReportStore {
    private readonly reportDir;
    /** Single-writer chain — every mutation `await`s the previous one. */
    private writeQueue;
    constructor(reportDir: string);
    private get indexPath();
    private reportPath;
    private ensureDir;
    private emptyIndex;
    /**
     * Read+parse the index. Returns an empty index when:
     *  - The file doesn't exist (first-ever save).
     *  - The JSON is corrupted (rare, but recoverable — the next save rewrites it).
     *  - The version is unrecognised.
     *
     * Logs a warning on corruption so we notice in CI/dev.
     */
    private readIndex;
    private writeIndex;
    /**
     * Schedule `op` after every previously enqueued mutation. The continuation
     * stored back into `writeQueue` deliberately swallows the result and any
     * error so a single failing op cannot poison every subsequent write — the
     * caller still receives the original promise (with the original rejection).
     */
    private enqueue;
    save(report: SceneReport, routeProfile?: SceneRouteProfile, options?: {
        indexByHash?: boolean;
    }): Promise<void>;
    loadById(reportId: string): Promise<SceneReport | null>;
    loadByHash(hash: string, routeProfile?: SceneRouteProfile): Promise<SceneReport | null>;
    delete(reportId: string): Promise<boolean>;
    cleanupExpired(nowMs: number): Promise<number>;
}
//# sourceMappingURL=sceneReportStore.d.ts.map