import { type Logger } from '@opensip-cli/core'; export { DEFAULT_SESSION_RETENTION_KEEP, DEFAULT_SESSION_RETENTION_MAX_AGE_DAYS, DEFAULT_SESSION_RETENTION_MAX_SIZE_MB, resolveCurrentSessionRetentionPolicy, resolveSessionRetentionPolicy, } from './session-retention-policy.js'; import type { SessionRetentionPolicy } from './session-retention-policy.js'; import type { DataStore } from '@opensip-cli/datastore'; export type { ResolvedSessionRetentionPolicy, SessionRetentionPolicy, SessionRetentionPolicySource, } from './session-retention-policy.js'; /** Maximum rows selected by any one automatic retention transaction. */ export declare const EVIDENCE_RETENTION_BATCH_SIZE = 256; /** Maximum bounded Session→parent-Run passes in one command finalizer. */ export declare const MAX_EVIDENCE_RETENTION_ITERATIONS = 32; export interface EnforceSessionRetentionDeps { readonly now?: number; readonly logger?: Logger; } /** * Best-effort retention summary. `unresolvedProtected` means evidence retained * by the effective policy or a live Session link remains while the SQLite file * is over its advisory size target. `unresolvedNonEvidence` is true only when * no Session or parent-Run evidence remains, so unrelated governed tables are * what keep the whole database over that target. */ export interface EvidenceRetentionResult { readonly sessionsDeleted: number; readonly runsDeleted: number; readonly protectedRuns: number; readonly iterations: number; readonly sizeIterations: number; readonly iterationLimitHit: boolean; readonly finalSizeBytes?: number; readonly unresolvedProtected: boolean; readonly unresolvedNonEvidence: boolean; } /** * Best-effort host-owned retention for persisted Session and parent-Run * evidence. Failures never alter the primary tool verdict or exit code. */ export declare function enforceSessionRetention(datastore: DataStore, policy: SessionRetentionPolicy, deps?: EnforceSessionRetentionDeps): EvidenceRetentionResult; //# sourceMappingURL=session-retention.d.ts.map