import type { BrowserContext, Cookie } from "playwright";
export interface AuthSessionEntry {
    personaId: string;
    personaName: string;
    context: BrowserContext;
    cookies: Cookie[];
    loginUrl: string;
    loggedInAt: string;
    lastRefreshedAt: string;
}
export interface AuthSessionPoolOptions {
    /** Max age of a session before it needs re-login (ms, default 30 min) */
    sessionMaxAgeMs?: number;
}
/**
 * Manages pre-authenticated browser sessions for multiple personas.
 * Each persona with auth credentials gets its own persistent browser context
 * with cookies/localStorage restored, so test scenarios start authenticated.
 */
export declare class AuthenticatedSessionPool {
    private readonly sessions;
    private readonly sessionMaxAgeMs;
    constructor(options?: AuthSessionPoolOptions);
    /**
     * Pre-login a single persona — launches a browser context with restored auth state.
     * If the persona has no auth credentials, returns null.
     */
    addPersona(personaId: string): Promise<AuthSessionEntry | null>;
    /**
     * Get an authenticated context for a persona. Returns null if not authenticated.
     */
    getContext(personaId: string): BrowserContext | null;
    /**
     * Get all active session entries.
     */
    getSessions(): AuthSessionEntry[];
    /**
     * Check if a persona has an active session.
     */
    hasSession(personaId: string): boolean;
    /**
     * Remove and close a persona's session.
     */
    removePersona(personaId: string): Promise<void>;
    /**
     * Refresh all sessions by re-login.
     */
    refreshAll(): Promise<void>;
    /**
     * Close all sessions and release resources.
     */
    closeAll(): Promise<void>;
    private isSessionFresh;
    private removeSession;
    private resolveBaseUrl;
}
//# sourceMappingURL=auth-session-pool.d.ts.map