/** * `~/.lyse/profile.json` records the once-per-machine opt-in decision so we * never re-prompt. After a 2xx from the Worker the email itself is dropped * locally (only `sentAt` survives); if delivery failed we keep the email * locally so the next audit can retry. */ export type ProfileFile = { email: string; createdAt: string; lyseVersion: string; sentAt?: string; } | { declined: true; declinedAt: string; lyseVersion: string; }; export declare function workerEmailEndpoint(env?: NodeJS.ProcessEnv): string; export declare function isValidEmail(input: string): boolean; export declare function profilePath(homeDir?: string): string; export declare function hasProfileDecision(homeDir?: string): boolean; export declare function readProfile(homeDir?: string): ProfileFile | null; export declare function shouldPromptForEmail(opt: { yes?: boolean; }, env?: NodeJS.ProcessEnv, isTTY?: boolean, homeDir?: string): boolean; export declare function buildProfile(email: string, now?: Date): ProfileFile; export declare function buildDeclinedProfile(now?: Date): ProfileFile; export declare function persistProfile(profile: ProfileFile, homeDir?: string): Promise; export declare function postEmailToWorker(email: string, opt?: { endpoint?: string; timeoutMs?: number; env?: NodeJS.ProcessEnv; }): Promise; export declare function syncPendingEmail(homeDir?: string): Promise<"sent" | "skipped" | "failed">; export declare function maybePromptForEmail(opt: { yes?: boolean; }): Promise;