/**
 * src/tools/email-browser.ts
 *
 * Browser-driven email fallback. When SMTP rejects the user's password
 * (common case: Gmail / Outlook / Yahoo blocked the regular password
 * because the account has 2FA on), we fall back to logging in through
 * the actual web UI via Playwright.
 *
 * One persistent browser profile per email address — kept under
 * <dataDir>/browser-state/<provider>/<safe-email>/ — so the second
 * send doesn't have to re-login. Cookies, localStorage, and IndexedDB
 * all persist between runs.
 *
 * Currently implements Gmail. Outlook, Yahoo, etc. would slot in next
 * to it as separate orchestrators.
 *
 * First send: headed window so the user can see the login + solve any
 * 2FA / device-verification challenge if Google flags us. After a
 * successful send, subsequent sends use the same profile so re-login
 * is rare. Set MUASSIS_EMAIL_HEADLESS=1 to force headless even on
 * first run.
 */
interface BrowserSendResult {
    ok: boolean;
    output: string;
    awaitingChallenge?: boolean;
}
/**
 * Drive Gmail's web UI to send an email. Reuses the saved persistent
 * context if one exists. Returns awaitingChallenge=true when Google
 * presents a 2FA / device-verification page — the caller relays that
 * back to the user as "tap the phone, then try again."
 *
 * Selectors are kept to the most stable ones I know. Gmail evolves;
 * these need maintenance every few quarters. Failures throw with a
 * screenshot path saved to <dataDir>/browser-state/gmail/<hash>/last-error.png
 * so the user can see exactly where the flow stopped.
 */
export declare function sendEmailViaGmailWeb(args: {
    email: string;
    password: string;
    to: string;
    subject: string;
    body: string;
    bodyType?: 'text' | 'html';
}): Promise<BrowserSendResult>;
export {};
//# sourceMappingURL=email-browser.d.ts.map