export type KeyringBackendId = 'macos-keychain' | 'libsecret' | 'windows-dpapi' | 'none'; export interface KeyringProbe { backend: KeyringBackendId; available: boolean; /** Actionable one-liner when unavailable — shown verbatim to the user. */ hint?: string; } /** Injectable process runner (tests pass a fake; nothing else should). */ export interface Runner { /** Run `file args…`, optionally writing `input` to stdin. Returns stdout. */ run(file: string, args: string[], input?: string): string; platform: NodeJS.Platform; } /** Which backend this platform uses, and whether it's actually usable here. */ export declare function probeKeyring(r?: Runner): KeyringProbe; /** Thrown when the keyring is unusable. Callers surface .message as-is. */ export declare class KeyringUnavailableError extends Error { } export declare function keyringSet(secret: string, r?: Runner): void; /** The stored passphrase, or null when absent. Throws only if unusable. */ export declare function keyringGet(r?: Runner): string | null; /** Remove the stored passphrase. True if something was removed. */ export declare function keyringDelete(r?: Runner): boolean; /** Single-quote for the `security -i` command line (POSIX-ish tokenizer). */ export declare function shQuote(s: string): string; /** Single-quote for PowerShell, where '' is the escaped quote. */ export declare function psQuote(s: string): string; //# sourceMappingURL=keyring.d.ts.map