/** * Luma cookie capture via a controlled Chromium window. * * Architecture mirrors `linkedinLogin.ts` — Luma auth is cookie-only, * not OAuth, and the cookies can only be obtained by completing a real * sign-in (Google OAuth handoff, passkey challenge, or magic-link email) * through Luma's UI. Once captured, every subsequent Luma API call is * direct aiohttp HTTPS via `melayaAgents/shared/tools/luma.py` — no * browser needed for ongoing pipeline work. * * Flow * ---- * 1. The Melaya server emits `luma:start-login` to this runner. * 2. We launch a HEADED Chromium window pointed at https://luma.com/signin. * 3. Poll the page URL — Luma redirects to /home (or /events/manage) once * the user is authenticated. * 4. Extract `luma.auth-session-key` and `luma.user-id` cookies and * return them via `luma:login-result`. * * The chromium-install bootstrap is shared with the LinkedIn flow — if * the user has already done a LinkedIn sign-in once, the second connector * runs in <2s. */ export interface LumaLoginResult { ok: true; cookies: { auth_session_key: string; user_id?: string; }; extraCookies?: Record; profileName?: string; } export interface LumaLoginError { ok: false; error: string; detail?: string; } export type LumaLoginOutcome = LumaLoginResult | LumaLoginError; interface ProgressEmitter { (msg: string): void; } /** Close the in-flight Luma sign-in browser, if any. Returns true if a * window was actually open. Best-effort — never throws. */ export declare function cancelActiveLumaLogin(): Promise; export declare function runLumaLoginFlow(progress: ProgressEmitter): Promise; export declare function describeOutcome(outcome: LumaLoginOutcome): string; export {};