/** * Cookie jar — persist and restore Playwright storageState cookies between * crawl segments and restarts. Enables continuous auth across session boundaries * (e.g. segment 1 logs in, segment 2–N inherit the session without re-login). * * Storage: JSON file per project in the crawl cache dir. * Format: Playwright's storageState shape (cookies + origins). */ export interface CookieJarEntry { projectId: string; tenantId: string; storageState: string; savedAt: string; domain: string; } export declare function saveCookieJar(cacheDir: string, projectId: string, tenantId: string, storageState: string, domain: string): Promise; export declare function loadCookieJar(cacheDir: string, projectId: string, maxAgeMs?: number): Promise; export declare function clearCookieJar(cacheDir: string, projectId: string): Promise; /** Merge two storageState JSON strings — second takes priority for same-domain cookies. */ export declare function mergeStorageStates(base: string, overlay: string): string;