/** * ~/.clustly/credentials — the builder key at rest (design: docs/designs/clustly-cli.md §4; * build-plan 3.3). Owner-only modes; the plaintext key lives ONLY here and in the server's * hashed form. Reads are forgiving (missing/corrupt → signed out); writes are NOT best-effort * — failing to persist a just-minted key is a failed login and must say so. */ export interface Credentials { apiKey: string; keyPrefix: string; savedAt: string; } export declare const BUILDER_KEY_PATTERN: RegExp; /** Display/lookup prefix length — the server-side agent_api_keys/builder_keys convention. */ export declare const KEY_DISPLAY_PREFIX_LEN = 8; export declare function readCredentials(home: string, warn?: (line: string) => void): Credentials | undefined; export declare function writeCredentials(home: string, apiKey: string, keyPrefix: string): Credentials; /** Returns true when something was actually removed. */ export declare function clearCredentials(home: string): boolean;