export interface RemoteExperienceV1 { schemaVersion: 1; id: string; class: "required" | "engagement"; type: "security_notice" | "migration_notice" | "update_notice" | "announcement" | "beta_invite" | "dashboard_invite" | "design_partner_invite"; title: string; body: string; action?: { label: string; url: string; }; expiresAt?: string; cooldownKey: string; } /** * Generic request fields always sent. * When telemetry is disabled or installId is null, only these fields are included. * Never includes sessionId, run counts, repo data, scores, or workspace identifiers. */ export interface RemoteExperienceRequest { schemaVersion: 1; cliVersion: string; nodeVersion: string; platform: string; arch: string; /** Only included when telemetry is active and installId is available. */ installId?: string; } export declare function parseRemoteExperience(value: unknown, nowMs?: number): RemoteExperienceV1 | null; /** * Returns the remote-experience endpoint (separate from product-events telemetry). * Configured via MARTIN_REMOTE_EXPERIENCE_ENDPOINT. Returns "" when not set. * fetchRemoteExperience returns null when the endpoint is empty. */ export declare function resolveRemoteExperienceEndpoint(): string; export declare function fetchRemoteExperience(request: Readonly, options: { endpoint: string; timeoutMs?: number; fetchImpl?: typeof fetch; }): Promise; /** * Returns true when the cooldownKey was delivered within the cooldown window. * Safe to call even if the ledger file does not exist. */ export declare function isRemoteExperienceOnCooldown(cooldownKey: string, nowMs?: number): Promise; /** * Records that an experience was delivered. Call AFTER the experience has been * displayed to the user — never at fetch or selection time. */ export declare function recordRemoteExperienceDelivered(cooldownKey: string, nowMs?: number): Promise; /** * Returns true when the dismissKey has been permanently dismissed (user pressed N). */ export declare function isRemoteExperienceDismissed(dismissKey: string): Promise; /** * Permanently suppresses an experience by dismissKey. Used when the user presses N. * Does not affect required notices. */ export declare function recordRemoteExperienceDismissed(dismissKey: string): Promise;