/**
 * HARPER_DEFAULT_CONFIG and HARPER_SET_CONFIG environment variable support
 *
 * This module provides utilities for applying configuration from environment variables
 * to Harper's configuration system with source tracking and drift detection.
 *
 * Features:
 * - Install-time and runtime configuration from env vars
 * - Source tracking (which env var set each config value)
 * - Drift detection (detect manual config file edits)
 * - Snapshot-based deletion (remove values when omitted from env var)
 */
type ConfigObject = Record<string, any>;
/**
 * Custom error for configuration environment variable parsing/validation
 */
export declare class ConfigEnvVarError extends Error {
    envVarName?: string;
    originalError?: Error;
    constructor(message: string, envVarName?: string, originalError?: Error);
}
/**
 * Filters out arguments that are already set in HARPER_SET_CONFIG.
 * This prevents individual environment variables from overriding runtime configuration.
 *
 * Note: Only filters against HARPER_SET_CONFIG, not HARPER_DEFAULT_CONFIG, since
 * HARPER_DEFAULT_CONFIG sets defaults that can be overridden by individual env vars.
 *
 * @param args - Object containing individual env var arguments (e.g., from assignCMDENVVariables)
 * @returns Filtered args object with HARPER_SET_CONFIG keys removed
 *
 * @example
 * // If HARPER_SET_CONFIG sets operationsApi.network.port
 * const args = { operationsapi_network_port: '9925', rootpath: '/var/hdb' };
 * const filtered = filterArgsAgainstRuntimeConfig(args);
 * // Returns: { rootpath: '/var/hdb' }
 */
export declare function filterArgsAgainstRuntimeConfig(args: Record<string, any>): Record<string, any>;
/**
 * Compose a merged config from HARPER_DEFAULT_CONFIG and HARPER_SET_CONFIG
 * layered with an optional base. Later layers win:
 *   HARPER_DEFAULT_CONFIG  <  base  <  HARPER_SET_CONFIG
 *
 * HARPER_DEFAULT_CONFIG provides scaffolding defaults, the base (e.g., the
 * user's existing config file) is layered on top, and HARPER_SET_CONFIG
 * force-overrides everything. This matches the precedence applied by the
 * runtime pipeline in applyRuntimeEnvConfig.
 *
 * Unlike applyRuntimeEnvConfig, this does NOT read or write the config state
 * file and does NOT track sources — it returns a fresh object. Use when you
 * need the effective value of a config key before the state/file wiring is in
 * place (e.g., during clone / pre-install).
 */
export declare function composeConfigFromEnv(base?: ConfigObject): ConfigObject;
/**
 * Apply HARPER_DEFAULT_CONFIG and HARPER_SET_CONFIG
 * Can be used for both install-time and runtime
 */
export declare function applyRuntimeEnvConfig(fileConfig: ConfigObject, rootPath: string, options?: {
    isInstall?: boolean;
}): ConfigObject;
export {};
