export interface ContributeConfig { enabled: boolean; consentedAt: string | null; consentVersion: string; } export interface LlmConfig { enabled: boolean; consentedAt: string | null; consentVersion: string; } export interface PreferencesConfig { rememberedChoices: Record; } export interface TelemetryConfig { scanCount: number; contributePromptDismissedAt: string | null; } export interface UserConfig { version: 1; contribute: ContributeConfig; registry: { url: string; }; llm: LlmConfig; preferences: PreferencesConfig; telemetry: TelemetryConfig; } export declare function getUserConfigDir(): string; export declare function getUserConfigPath(): string; /** * Registry host names that were in use before the migration to oa2a.org. * Any config pointing at one of these is silently rewritten on load to the * current canonical URL so existing users do not have to edit their config * manually after an upstream URL change. */ export declare const STALE_REGISTRY_HOSTS: readonly string[]; export declare const CANONICAL_REGISTRY_URL = "https://api.oa2a.org"; /** * Pure helper: returns true if the given URL matches a known-stale registry host. * Exported for testing. */ export declare function isStaleRegistryUrl(url: string | undefined | null): boolean; export declare function loadUserConfig(): UserConfig; export declare function saveUserConfig(config: UserConfig): void; export declare function isContributeEnabled(): boolean; export declare function setContributeEnabled(enabled: boolean): void; export declare function isLlmEnabled(): boolean; export declare function setLlmEnabled(enabled: boolean): void; export declare function getRememberedChoice(actionId: string): boolean | undefined; export declare function setRememberedChoice(actionId: string, value: boolean): void; export declare function incrementScanCount(): number; export declare function getScanCount(): number; /** * Returns true if the user should be shown a one-time prompt to opt into * sharing anonymized scan reports. Only shown after the user has completed * enough scans to have seen value, and not if they already opted in or * recently dismissed the prompt. */ export declare function shouldPromptContribute(): boolean; export declare function dismissContributePrompt(): void; //# sourceMappingURL=user-config.d.ts.map