import type { Readable } from "node:stream";
export declare const MAX_PERSISTED_TOOL_TEXT_CHARS = 40000;
export declare const COLD_SESSION_AGE_DAYS = 7;
export declare const SESSION_GZIP_VERSION = 1;
export declare const SESSION_REDIRECT_VERSION = 1;
export declare const SESSION_MEDIA_MARKER_VERSION = 1;
export declare const SESSION_PLAIN_SUFFIX = ".jsonl";
export declare const SESSION_ARCHIVE_SUFFIX = ".jsonl.gz";
export declare const SESSION_ASSET_SUFFIX = ".jsonl.assets";
export declare const SESSION_TEMP_MARKER = ".gg-session-tmp-";
declare const REDIRECT_TYPE = "gg_session_redirect";
export interface SessionRedirect {
    type: typeof REDIRECT_TYPE;
    version: typeof SESSION_REDIRECT_VERSION;
    target: string;
}
export interface StorageNormalizationMetrics {
    truncatedToolTexts: number;
    externalizedMedia: number;
    omittedPathMedia: number;
    removedDisplayItems: number;
}
export interface ArchiveSessionResult extends StorageNormalizationMetrics {
    archived: boolean;
    sourceBytes: number;
    archiveBytes: number;
    bytesSaved: number;
    path: string;
}
export declare function emptyStorageNormalizationMetrics(): StorageNormalizationMetrics;
export declare function isSessionPath(filePath: string): boolean;
export declare function isSessionTempPath(filePath: string): boolean;
export declare function plainSessionPath(filePath: string): string;
export declare function archiveSessionPath(filePath: string): string;
export declare function sessionAssetDir(filePath: string): string;
export declare function sessionGroupPaths(filePath: string): {
    plainPath: string;
    archivePath: string;
    assetsPath: string;
};
export declare function temporarySiblingPath(filePath: string): string;
export declare function resolveSessionPath(filePath: string): Promise<string>;
export declare function isGzipSessionPath(filePath: string): Promise<boolean>;
export declare function openSessionReadStream(filePath: string): Promise<{
    path: string;
    stream: Readable;
}>;
export declare function thawSessionArchive(filePath: string): Promise<string>;
export declare function normalizeSessionEntryForStorage<T>(entry: T, sessionPath: string, metrics?: StorageNormalizationMetrics): Promise<T | null>;
export declare function hydrateSessionEntry<T>(entry: T, sessionPath: string): Promise<T>;
export declare function archiveColdSession(sessionPath: string): Promise<ArchiveSessionResult>;
export declare function cleanupOldSessionTemps(directory: string, olderThanMs: number): Promise<{
    deletedFiles: number;
    freedBytes: number;
}>;
export {};
//# sourceMappingURL=session-storage.d.ts.map