import type { ZodType } from 'zod';
/**
 * Canonical 3-layer configuration loader.
 *
 * Generalizes the pattern from catalog-loader.ts (SPEC-054) into a reusable
 * class that any module can use to make its configuration extensible.
 *
 * @typeParam T - The type of a single configuration item (must have `id: string`)
 */
export declare class ConfigLoader<T extends {
    id: string;
}> {
    private readonly area;
    private readonly schema;
    private readonly require;
    constructor(area: string, schema: ZodType<T[]>);
    /**
     * Synchronously load and merge all 3 config layers.
     * Safe for module-level initialization.
     */
    load(projectHash?: string): T[];
    /**
     * Async version of load — preferred when called from async contexts.
     */
    loadAsync(projectHash?: string): Promise<T[]>;
    /**
     * Validate raw data against the schema. Returns parsed items or throws
     * a descriptive error with the exact path of the invalid field.
     */
    validate(data: unknown): T[];
    /**
     * Load only system defaults (src/config/{area}.json).
     */
    loadSystem(): T[];
    private loadGlobalSync;
    private loadProjectSync;
    private loadGlobalAsync;
    private loadProjectAsync;
    private loadFileSync;
    private loadFileAsync;
    /**
     * Merge items from 3 layers by `id`. Higher-precedence layers override
     * lower-precedence items with the same `id`. New ids are appended.
     */
    private merge;
}
/**
 * 3-layer configuration loader for structured (object) configs.
 *
 * Similar to ConfigLoader but works with a single object instead of an array.
 * Override layers are deep-merged (top-level keys only) with the system defaults.
 *
 * @typeParam T - The config object type
 */
export declare class ObjectConfigLoader<T extends Record<string, unknown>> {
    private readonly area;
    private readonly schema;
    private readonly require;
    constructor(area: string, schema: ZodType<T>);
    /** Synchronously load and merge all 3 config layers. */
    load(projectHash?: string): T;
    /** Async version of load. */
    loadAsync(projectHash?: string): Promise<T>;
    /** Validate raw data against the schema. */
    validate(data: unknown): T;
    /** Load system defaults. */
    loadSystem(): T;
    private loadFileSync;
    private loadFileAsync;
    /** Shallow merge: system <- global <- project (top-level keys). */
    private merge;
}
//# sourceMappingURL=config-loader.d.ts.map