/**
 * @license
 * Copyright 2025 Vybestack LLC
 * SPDX-License-Identifier: Apache-2.0
 */
import { type ExtensionSetting } from './extensionSettings.js';
/**
 * Scope for extension settings storage.
 */
export declare enum ExtensionSettingScope {
    /** User-level settings stored in extension directory */
    USER = "user",
    /** Workspace-level settings stored in workspace directory */
    WORKSPACE = "workspace"
}
/**
 * Loads extension settings from the manifest file.
 *
 * Tries llxprt-extension.json first, then falls back to gemini-extension.json.
 * Validates the settings array using ExtensionSettingArraySchema.
 *
 * @param extensionDir - The absolute path to the extension directory
 * @returns Array of validated extension settings, or empty array if none found or invalid
 */
export declare function loadExtensionSettingsFromManifest(extensionDir: string): ExtensionSetting[];
/**
 * Prompts the user for missing settings and saves them to storage.
 *
 * @param extensionName - The name of the extension
 * @param settings - Array of extension settings that may need values
 * @param existingValues - Record of existing setting values keyed by envVar
 * @param extensionDir - The absolute path to the extension directory
 * @returns Promise resolving to true if successful, false if user cancelled
 */
export declare function maybePromptAndSaveSettings(extensionName: string, settings: ExtensionSetting[], existingValues: Record<string, string | undefined>, extensionDir: string): Promise<boolean>;
/**
 * Loads saved extension settings as environment variables.
 * Merges user and workspace scopes, with workspace overriding user.
 *
 * Reads from both .env file (non-sensitive) and keychain (sensitive).
 *
 * @param extensionDir - The absolute path to the extension directory
 * @returns Promise resolving to record of environment variables
 */
export declare function getExtensionEnvironment(extensionDir: string): Promise<Record<string, string>>;
/**
 * Gets the path to the .env file for a specific scope.
 *
 * @param extensionName - Extension name
 * @param extensionDir - Extension directory path
 * @param scope - Setting scope (user or workspace)
 * @returns Path to the .env file for the specified scope
 */
export declare function getEnvFilePath(extensionName: string, extensionDir: string, scope: ExtensionSettingScope): string;
/**
 * Gets settings values for a specific scope.
 *
 * @param extensionName - Extension name
 * @param extensionDir - Extension directory path
 * @param scope - Setting scope (user or workspace)
 * @returns Promise resolving to record of environment variables
 */
export declare function getScopedEnvContents(extensionName: string, extensionDir: string, scope: ExtensionSettingScope): Promise<Record<string, string | undefined>>;
/**
 * Gets all settings and their values for display purposes.
 * Merges user and workspace scopes, with workspace overriding user.
 * Sensitive settings show '[value stored in keychain]' instead of actual value.
 * Missing settings show '[not set]'.
 *
 * @param extensionName - Extension name
 * @param extensionDir - Extension directory path
 * @param scope - Optional scope to filter by (defaults to merging both)
 * @returns Promise resolving to array of setting display info
 */
export declare function getEnvContents(extensionName: string, extensionDir: string, scope?: ExtensionSettingScope): Promise<Array<{
    name: string;
    value: string;
}>>;
/**
 * Updates a single extension setting.
 *
 * @param extensionName - Extension name
 * @param extensionDir - Extension directory path
 * @param settingKey - Setting name or envVar to update
 * @param requestSetting - Function to prompt user for new value
 * @param scope - Optional scope (defaults to USER)
 * @returns Promise resolving to true if successful
 */
export declare function updateSetting(extensionName: string, extensionDir: string, settingKey: string, requestSetting: (prompt: string, sensitive: boolean) => Promise<string>, scope?: ExtensionSettingScope): Promise<boolean>;
