/** * Default Chrome profile discovery (plan Phase 2 wiring). * * Locates the user's real Chrome "Default" profile directory per OS so the * default headless launch path can warm up synthetic sessions from an isolated * copy of it (see profile-warmup.ts + profile-posture.ts). Pure path logic with * an injectable existence check, so it is unit-testable without touching the * real filesystem. */ export interface DiscoveryEnv { platform: NodeJS.Platform; home: string; /** Injectable for tests; defaults to fs.existsSync at call sites. */ exists: (p: string) => boolean; /** Windows LOCALAPPDATA override (tests / non-default installs). */ localAppData?: string; /** Linux Chrome-specific default user-data override. */ chromeUserDataDir?: string; /** Linux Chrome config-home override (takes precedence over XDG_CONFIG_HOME). */ chromeConfigHome?: string; /** Linux XDG config-home override. */ xdgConfigHome?: string; } /** Candidate Chrome user-data roots for the platform (most common first). */ export declare function chromeUserDataRoots(env: DiscoveryEnv): string[]; export interface DiscoveredProfile { userDataDir: string; profileDirectory: string; profileDir: string; } /** * Discover the default Chrome profile, or null when none is present. * Only returns a profile whose directory actually exists. */ export declare function discoverDefaultChromeProfile(env: DiscoveryEnv, profileDirectory?: string): DiscoveredProfile | null; /** Convenience wrapper using the live OS environment + fs. */ export declare function defaultDiscoveryEnv(exists: (p: string) => boolean): DiscoveryEnv;