export interface StorageCookie { name: string; value: string; domain: string; path: string; expires: number; httpOnly: boolean; secure: boolean; sameSite: 'Strict' | 'Lax' | 'None'; } /** One `Set-Cookie` header to a Playwright cookie. Returns null for a deletion (empty value / already expired). */ export declare function parseSetCookie(header: string, host: string, now?: number): StorageCookie | null; /** Merge cookies by name (later wins), the way a cookie jar does for one origin. */ export declare function mergeCookies(jar: Map, headers: string[], host: string): void; export declare const cookieHeader: (jar: Map) => string; /** * Sign in as the bearer's user and write a Playwright storage state to `file`. Returns the username the session * resolved to; throws when the website refuses (a forged token never makes a session: the website validates the bearer * server-side against /users/me). */ export declare function mintStorageStateOverHttp(webBase: string, accessToken: string, file: string, fetchImpl?: typeof fetch): Promise; export interface EntryFlowResult { /** The account was already past the first-run entry flow. */ alreadyDone: boolean; /** It is past it now. */ done: boolean; steps: string[]; } /** * A brand-new account lands on the website's blocking "Claim your name" entry modal, whose username input takes keyboard * focus: every key the harness sends (E to board a car) goes into that input and the world never sees it. The entry * flow is three API calls (confirm the seeded username, no interests, default avatar), the same ones the modal makes, so * the harness completes it for an account that has not. A no-op for any account that already has. */ export declare function completeEntryFlow(apiBase: string, accessToken: string, fetchImpl?: typeof fetch): Promise;