/** * Unbound Code Storage - API Key and Config Management * * Stores API key securely in system keychain when available, * falls back to file-based storage for cross-platform compatibility */ export interface UnboundConfig { model?: string; baseUrl?: string; logLevel?: string; lastUsed?: string; apiKey?: string; useVertex?: boolean; vertexPrimaryModel?: string; vertexSmallModel?: string; isConfigured?: boolean; } export declare class UnboundStorage { private readonly SERVICE_NAME; private readonly ACCOUNT_NAME; private readonly CONFIG_DIR; private readonly CONFIG_FILE; constructor(); /** * Generate machine-specific encryption key */ private getMachineKey; /** * Encrypt sensitive data */ private encrypt; /** * Decrypt sensitive data */ private decrypt; private ensureConfigDir; private readConfig; private writeConfig; /** * Store API key securely (keychain preferred, file fallback) */ setApiKey(apiKey: string, silent?: boolean): Promise; /** * Get stored API key (keychain preferred, file fallback) */ getApiKey(): Promise; /** * Get stored model */ getModel(): Promise; /** * Store model preference */ setModel(model: string): Promise; /** * Get full configuration */ getFullConfig(): Promise; /** * Update configuration */ updateConfig(updates: Partial): Promise; /** * Clear all stored data including keychain and config file */ clearConfig(): Promise; clearConfigDueToInvalidKey(): Promise; /** * Check if API key is stored */ hasApiKey(): Promise; /** * Check if API key is stored (sync version for backward compatibility) */ hasApiKeySync(): boolean; /** * Get vertex configuration */ getVertexConfig(): Promise<{ useVertex: boolean; model?: string; smallModel?: string; }>; /** * Store vertex configuration */ setVertexConfig(vertexConfig: { useVertex: boolean; model?: string; smallModel?: string; }): Promise; /** * Check if user has completed initial configuration */ isConfigured(): Promise; /** * Mark configuration as complete */ markAsConfigured(): Promise; /** * Get startup display configuration */ getStartupConfig(): Promise<{ hasApiKey: boolean; model: string; useVertex: boolean; vertexPrimaryModel?: string; vertexSmallModel?: string; baseUrl: string; }>; } //# sourceMappingURL=storage.d.ts.map