import type { DrizzleHandle } from '@opensip-cli/datastore/internal'; /** Hard ceiling for one bounded parent-Run retention transaction. */ export declare const MAX_RUN_RETENTION_BATCH_SIZE = 500; /** Bounded outcome of one parent-Run retention transaction. */ export interface RunRetentionBatchResult { /** Rows inside the current count/age policy boundary before deletion. */ readonly examined: number; /** Rows preserved because at least one RunStep still links a retained Session. */ readonly protected: number; /** Unprotected parent Runs deleted by this bounded transaction. */ readonly deleted: number; /** Eligible rows left for a later bounded batch. */ readonly remainingEligible: number; } /** Shared immutable no-op outcome for disabled or empty retention passes. */ export declare const EMPTY_RUN_RETENTION_RESULT: RunRetentionBatchResult; /** @throws {RangeError} When a retention batch size falls outside the bounded policy. */ export declare function requireRetentionBatchSize(value: number): number; /** Count all persisted parent-Run rows inside the supplied transaction. */ export declare function countRunRows(tx: DrizzleHandle): number; /** Delete one bounded oldest-first batch outside the newest retained parent Runs. */ export declare function pruneCountExcessRunBatch(tx: DrizzleHandle, keep: number, batchSize: number): RunRetentionBatchResult; /** Delete one bounded oldest-first batch completed before the supplied cutoff. */ export declare function pruneAgedRunBatch(tx: DrizzleHandle, cutoff: number, batchSize: number): RunRetentionBatchResult; //# sourceMappingURL=run-retention.d.ts.map