import { ConfigStorage } from '../lib/config-storage';
import { PreferenceKey } from './preferences-schema';
/**
 * Where a resolved preference value came from.
 * Higher in the list = higher priority.
 */
export type PreferenceSource = 'explicit' | 'env' | 'project' | 'user' | 'default' | 'missing';
export interface ResolvedPreference<T = unknown> {
    key: PreferenceKey;
    value: T | null;
    source: PreferenceSource;
}
/**
 * Resolves user preferences across all configured layers.
 *
 * Cascade (first hit wins):
 *   explicit value > env var > project-local > user-global (active profile) > default > missing
 *
 * The project-local file may only override keys whose schema declares
 * `projectOverridable: true`. Secret values (tokens, apiKey) are never read here.
 */
export declare class PreferencesResolver {
    private readonly storage;
    private readonly cwd;
    private projectConfigCache;
    constructor(storage?: ConfigStorage, cwd?: string);
    resolve<T = string>(key: PreferenceKey, explicit?: T | null | undefined): ResolvedPreference<T>;
    /**
     * Resolve every key declared in the schema. Useful for `flui pref` listing.
     */
    resolveAll(): ResolvedPreference[];
    /**
     * Validate a candidate value against the schema. Returns null when ok.
     */
    static validate(key: PreferenceKey, value: string): string | null;
    projectFilePath(): string;
    /**
     * Lazy-load the project-local file once per resolver instance.
     * Returns null when missing or unreadable; throws only on malformed JSON
     * (so config errors don't fail silently).
     */
    private readProjectFile;
}
