import type { SecretsBundle } from './bundles.js'; import type { SecretLease } from './lease.js'; export declare const SESSION_ITEM_PREFIX = "agents-cli.session."; export declare const SESSION_INDEX_ITEM = "agents-cli.session.index"; export interface SessionEntry { bundle: SecretsBundle; env: Record; expiresAt: number; sleepPersist: boolean; harness?: string; lease?: SecretLease; } export interface SessionIndexMeta { expiresAt: number; sleepPersist: boolean; harness?: string; } export interface SessionIndex { bundles: Record; } export declare function selectRehydratable(index: SessionIndex, now: number): string[]; export declare function pruneOnSleep(index: SessionIndex): { survivors: SessionIndex; deletedNames: string[]; }; export declare function pruneExpired(index: SessionIndex, now: number): { survivors: SessionIndex; expiredNames: string[]; }; export declare function upsertEntry(index: SessionIndex, name: string, meta: SessionIndexMeta): SessionIndex; export declare function removeEntry(index: SessionIndex, name: string): SessionIndex; export declare function readIndexStrict(): SessionIndex | null; export declare function readIndex(): SessionIndex; export declare function writeIndex(index: SessionIndex): void; export declare function saveSession(name: string, entry: SessionEntry): void; export declare function resolveSession(name: string, now?: number, harness?: string): { entry: SessionEntry; harness: string; } | null; export declare function loadSession(name: string, now?: number, harness?: string): SessionEntry | null; export declare function deleteBundleSessions(name: string): void; export declare function deleteSession(name: string, harness?: string): void; export declare function deleteLeaseSession(leaseId: string): number; export declare function deleteAllSessions(): boolean; export declare function rehydrateSessions(now?: number, candidates?: readonly string[]): Array<{ name: string; entry: SessionEntry; }>; export declare function pruneSessionsOnSleep(): void;