export declare enum AuthErrorCategory { RETRYABLE = "retryable", USER_ACTION = "user_action", FATAL = "fatal" } export interface AuthError { code: string; message: string; category: AuthErrorCategory; details?: Record; } /** Device was registered with a different DH algorithm than currently negotiated */ export declare const ALGORITHM_MISMATCH = "ALGORITHM_MISMATCH"; /** No common algorithm between client and server */ export declare const ALGORITHM_NEGOTIATION_FAILED = "ALGORITHM_NEGOTIATION_FAILED"; export declare function shouldClearDeviceCredentials(errorCode: string, action?: string): boolean; /** * Check if an error code should trigger auto-recovery (clear device + retry). * This enables seamless recovery when a user switches browsers and their * stored device credentials use a different algorithm than what the new * browser supports. */ export declare function shouldAutoRecoverFromError(errorCode: string): boolean;