/** * Thread-key derivation from RFC 5322 `Message-ID`, `In-Reply-To`, * and `References` headers. Given a parsed email we return a stable * identifier that groups messages in the same conversation. * * @module */ import type { ParsedEmail } from "../parse/index.mjs"; export interface ThreadKeyInput { messageId?: string; inReplyTo?: string; references?: ReadonlyArray; } /** Pick the canonical root Message-ID for a parsed email. */ export declare function threadKey(input: ThreadKeyInput | ParsedEmail): string; /** Build a deterministic adjacency list `{ root -> [member-ids] }` from * a batch of parsed messages. Useful for UI grouping. */ export declare function buildThreads(messages: ReadonlyArray): Map;