/** * Relay config helpers for better-email-mcp. * * The live credential path is in `credential-state.ts` (stdio fallback * spawns a LOCAL `runLocalServer`; HTTP modes mount via `transports/http.ts`). * This module exposes: * - `formatCredentials`: reads a STORED config blob (`{ EMAIL_CREDENTIALS }` * or legacy per-field) back into the `EMAIL_CREDENTIALS` string. * - `assembleEmailCredentials`: encodes the `accounts` array submitted by * mcp-core's card-group credential form into that same string. */ /** * Format a stored relay config into the EMAIL_CREDENTIALS string. * * Supports two stored shapes: * - New (multi-account): { EMAIL_CREDENTIALS: "email1:pass1,email2:pass2" } * - Legacy (single account): { email, password, imap_host? } */ export declare function formatCredentials(config: Record): string; /** One account card as submitted by mcp-core's card-group credential form. */ export interface EmailAccountCard { email?: string; password?: string; imap_host?: string; imap_port?: string; } /** * Encode the `accounts` array from the card-group credential form into the * comma-separated EMAIL_CREDENTIALS string. Mirrors the encoder that used to * live client-side in the forked `credential-form.ts`: * - Outlook/Hotmail/Live: the email only (server runs the device-code flow; * any password typed is ignored). * - Others: `email:password[:imap_host[:imap_port]]`. The port is appended * only when the host carries no colon of its own. * Cards without an email — and non-Outlook cards without a password — are * skipped, matching the fork's submit-time filter. */ export declare function assembleEmailCredentials(accounts: EmailAccountCard[] | undefined): string; /** * Emails of the cards `assembleEmailCredentials` would drop: an address was * typed but no password, and the domain is not on the OAuth path. The encoder * skips those silently — correct for an encoder, wrong as the end of the story, * because the submitter sees no error and nothing happens (reported in #1049 * for an M365 custom domain). The transport calls this first and names them. */ export declare function findUnusableAccountCards(accounts: EmailAccountCard[] | undefined): string[]; //# sourceMappingURL=relay-setup.d.ts.map