import { z } from "zod"; /** * Project configuration schema. * Each project specifies its path and glob patterns for selecting rules. */ export declare const Project: z.ZodObject<{ path: z.ZodPipe>; rules: z.ZodArray; }, z.core.$strip>; /** * Main configuration schema. * Defines the central rules directory and all projects to sync. */ export declare const Config: z.ZodObject<{ rulesSource: z.ZodPipe, z.ZodTransform>; global: z.ZodOptional>; globalOverrides: z.ZodOptional>>; projects: z.ZodOptional>; rules: z.ZodArray; }, z.core.$strip>>>; }, z.core.$strip>; /** * Inferred types from Zod schemas */ export type Project = z.infer; export type Config = z.infer; /** * Parse and validate configuration from JSON string. * * @param jsonContent - Raw JSON configuration string * @returns Validated and normalized configuration object * @throws {ZodError} If validation fails (invalid structure, missing fields, etc.) */ export declare function parseConfig(jsonContent: string): Config; /** * Find the most specific project configuration containing the given path. * * When multiple projects match (e.g., nested projects), returns the deepest one. * Uses path.relative for robust boundary checking to prevent partial matches. * * @param currentPath - Path to search for (can be a file or directory) * @param config - Configuration containing all projects * @returns The most specific matching project, or undefined if no match * @example * // Given projects: ["/app", "/app/frontend"] * findProjectForPath("/app/frontend/src", config) * // Returns project with path "/app/frontend" (not "/app") */ export declare function findProjectForPath(currentPath: string, config: Config): Project | undefined;