/**
 * Cron script: email-fetch
 *
 * Polls IMAP for new emails and persists them as Email nodes in the graph.
 * Runs every minute via cron; checks pollIntervalMinutes before fetching.
 *
 * Flow:
 *   1. Acquire PID lock (skip if another instance is running)
 *   2. Load EmailAccount config + poll state
 *   3. Check if enough time has elapsed since lastPollAt
 *   4. Connect to IMAP, fetch emails since lastFetchedUid
 *   5. Handle UIDVALIDITY changes (reset high-water mark, rely on MERGE dedup)
 *   6. Classify each email via Haiku (clean/suspicious/discard)
 *   7. Store each email as an Email node (MERGE on emailId) with screening verdict
 *      — discarded emails are stored without embedding (no vector pollution)
 *   8. Update high-water mark (lastFetchedUid, lastPollAt, uidValidity)
 *   9. Release lock
 *
 * Failures are logged but never crash the platform — next cycle retries
 * from the same high-water mark.
 *
 *   PLATFORM_ROOT=... ACCOUNT_ID=... node dist/scripts/email-fetch.js
 */
export {};
//# sourceMappingURL=email-fetch.d.ts.map