/**
 * Layer resolution for resources. Encapsulates which DotAgents repos a given
 * resource type reads from and in what precedence. Centralized so every
 * checker, plus the sync writer, agrees on the same set.
 *
 * Resolution model:
 *   - "first-wins" (commands, skills, mcp, subagents, workflows, plugins):
 *     project > user > system > extras. Same-named entries shadow.
 *   - "first-wins, no project" (hooks): security exclusion — see
 *     `src/lib/installations/versions.ts:1832-1836` for the rationale. User > system > extras.
 *   - "merged" (permissions): every layer contributes; first-wins on name.
 *   - "composed" (rules): preset + subrules resolved per-name across layers.
 */
/** Layer of provenance for a single resource entry. */
export type LayerScope = 'project' | 'user' | 'system' | 'extra';
export interface Layer {
    scope: LayerScope;
    /** Absolute path of the repo root (e.g. `~/.agents`). */
    base: string;
    /** Set only when scope === 'extra'. */
    alias?: string;
}
export declare function clearLayerCache(): void;
/** All layers a "first-wins with project" resource consults, in precedence order. */
export declare function firstWinsLayers(cwd: string): Layer[];
/** Hooks-only: layers excluding project (security exclusion). */
export declare function hookLayers(): Layer[];
/**
 * Resolve a single resource by name. Returns the first matching layer's
 * absolute path plus the layer scope, or null when no layer has it.
 */
export declare function resolveByName(layers: Layer[], relative: string, predicate: (full: string) => boolean): {
    path: string;
    layer: Layer;
} | null;
/** Convenience: list names found by reading a relative subdir across all given layers. */
export declare function listAcrossLayers(layers: Layer[], relative: string, filter: (name: string, fullPath: string) => boolean): string[];
