/** * Thin wrapper around the optional @napi-rs/keyring native binding. * * Exports a stable interface regardless of whether the binding loaded. * All callers go through keychainAvailable() before calling set/get/delete. * * Design: we use createRequire so this module stays ESM-first while importing * a CJS binding. If the binding fails to load (missing binary, sandbox EPERM, * etc.) keychainAvailable() returns false and the file-fallback tier is used. */ /** * Returns true if the OS keychain is accessible. * * Cached for the process lifetime: keychain availability is a static property * of the host (binary loaded + Entry constructable) that does not change * between calls. Probing on every key resolution constructed a fresh Entry * 8+ times per synthesis — wasted work, now collapsed to one probe. */ export declare function keychainAvailable(): boolean; /** Test hook: reset the cached availability probe + module load state. */ export declare function _resetKeychainAvailability(): void; declare const WIGOLO_SERVICE = "wigolo"; /** Store a secret in the OS keychain. Throws on failure. */ export declare function keychainSet(service: string, user: string, value: string): void; /** Retrieve a secret from the OS keychain. Returns null if not found. */ export declare function keychainGet(service: string, user: string): string | null; /** Delete a secret from the OS keychain. Silently ignores missing entries. */ export declare function keychainDelete(service: string, user: string): void; export { WIGOLO_SERVICE }; //# sourceMappingURL=keychain.d.ts.map