/**
 * Centralized exclusions — data-driven from `.gitignore`-style files.
 *
 * Three layers, unioned:
 *   1. Bundled `default-exclusions.gitignore`  — ships with dxkit, always applied.
 *   2. Project `.gitignore`                    — whatever the repo already ignores.
 *   3. Project `.dxkit-ignore` (optional)       — dxkit-specific extras.
 *
 * All three use the same parser so they behave identically. Users add/remove
 * exclusions by editing a plain text file — no code changes needed.
 *
 * The canonical question "should this path be excluded?" is answered by
 * `isExcludedPath()`. Tool-specific flag builders (grep, cloc, semgrep, find,
 * graphify's Python) derive their flags from the same resolved exclusion set,
 * so drift between tools is impossible.
 */
/** Resolved exclusions for one project root. */
export interface Exclusions {
    /** Directory basenames — single-segment (no slash). Grep/find --exclude-dir friendly. */
    dirs: string[];
    /** Multi-segment path patterns. Need path-based matching. */
    sourcePaths: string[];
    /** File-glob patterns (e.g. *.min.js, *.d.ts, .DS_Store). */
    filePatterns: string[];
}
/**
 * Load resolved exclusions for a project root.
 *
 * Reads bundled defaults + project .gitignore + project .dxkit-ignore and
 * returns the union. Result is memoized per cwd for the process lifetime.
 */
export declare function loadExclusions(cwd: string): Exclusions;
/** Clear memo — useful for tests. */
export declare function clearExclusionsCache(): void;
/**
 * Test whether a relative file path should be excluded from analysis.
 *
 * This is the ONE place every tool-wrapper consults. If a caller is tempted
 * to inline `node_modules` / `dist` / `.min.` checks, they should call this
 * instead. Keeps all tools behaving identically.
 *
 * Path must be relative (strip the cwd prefix before calling).
 */
export declare function isExcludedPath(cwd: string, relPath: string): boolean;
/**
 * Build `find -not -path` flags excluding directories.
 * Usage: `find . -type f ... ${getFindExcludeFlags(cwd)}`
 */
export declare function getFindExcludeFlags(cwd: string, includeSourcePaths?: boolean): string;
/**
 * Build grep `--exclude-dir` flags (basename matching only).
 * Path-based exclusions must be post-filtered via isExcludedPath().
 */
export declare function getGrepExcludeDirFlags(cwd: string): string;
/**
 * Build cloc exclusion flags — `--exclude-dir` (basenames) PLUS
 * `--fullpath --not-match-d` (Perl regex on full directory path) for
 * multi-segment sourcePaths.
 *
 * Pre-fix, multi-segment paths in `.dxkit-ignore` were flattened to
 * basenames here, so `app/modules/plugins/VendorPlugin/` silently
 * became `{app, modules, plugins, VendorPlugin}` — cloc then excluded
 * EVERY directory named `app` in the tree, killing 90% of source
 * visibility on a deeply-nested .NET reference repo. The split-flag
 * construction preserves the path structure for cloc.
 *
 * The regex is anchored on path-segment boundaries with `(?:^|/)` /
 * `(?:/|$)` so `Dev/Addons/Foo` doesn't accidentally match `Dev/AddonsX`
 * or `XDev/Addons`. Path components are regex-escaped so `.`, `+`, etc.
 * aren't interpreted as metachars.
 */
export declare function getClocExcludeFlags(cwd: string): string;
/**
 * Build semgrep `--exclude` flags (one per directory/pattern).
 * Usage: `semgrep scan ${getSemgrepExcludeFlags(cwd)} .`
 */
export declare function getSemgrepExcludeFlags(cwd: string): string;
export declare function getJscpdIgnorePatterns(cwd: string): string[];
/**
 * Python literals for the graphify walker — emits both a basename set
 * (`EXCLUDE_DIRS`) and a multi-segment path list (`EXCLUDE_PATHS`) so
 * the Python filter can preserve the path structure of multi-segment
 * `.dxkit-ignore` entries.
 *
 * Pre-fix, basenames-only flattening here meant
 * `app/modules/plugins/VendorPlugin/` became
 * `{app, modules, plugins, VendorPlugin}` — graphify then skipped
 * every `app/` subtree (10 files walked instead of ~1700). The
 * two-set shape lets the walker check basenames via segment
 * membership AND check paths via substring match on the file's relpath.
 */
export declare function getPythonExcludeFilter(cwd: string): {
    dirsSet: string;
    pathsList: string;
    fileGlobsList: string;
};
//# sourceMappingURL=exclusions.d.ts.map