import { type Browser, type BrowserContext, type Page, type CDPSession } from 'playwright';
import { EventEmitter } from 'events';
export interface Session {
    sid: string;
    username: string;
    browser: Browser;
    context: BrowserContext;
    page: Page;
    cdp: CDPSession;
    createdAt: number;
    lastActivityAt: number;
    viewport: {
        w: number;
        h: number;
    };
    url: string;
}
declare class SessionManager extends EventEmitter {
    private sessions;
    private idleTimer;
    private started;
    start(): void;
    /** Return existing session for this user (reuse) or create a new one. */
    getOrCreate(username: string): Promise<Session>;
    get(sid: string, username: string): Session | null;
    destroy(sid: string): Promise<void>;
    destroyAll(): Promise<void>;
    size(): number;
    private sweepIdle;
}
export declare const browserChromeSessions: SessionManager;
export declare function mintSessionToken(sid: string, username: string): string;
export declare function verifySessionToken(token: string): {
    sid: string;
    username: string;
} | null;
export {};
//# sourceMappingURL=session-manager.d.ts.map