import type { CleanGitignoreBackend } from './cleanGitignore.ts';
import { type ResolvedCleanRules } from './cleanRules.ts';
import type { CleanConfig } from './compile/CleanConfig.ts';
import type { RuleLevel } from './compile/RuleLevelConfig.ts';
/** Built-in clean targets — always cleaned (bypass gitignored-only). */
export declare const BUILTIN_CLEAN_PATTERNS: readonly ["dist", "build"];
/**
 * CLI full-clean mode.
 * - `none` — normal clean
 * - `full` — also delete all gitignored paths (still honors exclude)
 * - `full-all` — like `full`, but only immutable excludes apply (config/default exclude ignored)
 */
export type CleanFullMode = 'full' | 'full-all' | 'none';
export interface CleanPlanIssue {
    level: Exclude<RuleLevel, 'off'>;
    message: string;
    rule: string;
}
export interface CleanPlan {
    /** Absolute paths approved for deletion. */
    deletePaths: string[];
    issues: CleanPlanIssue[];
    rules: ResolvedCleanRules;
}
export interface BuildCleanPlanOptions {
    config?: CleanConfig;
    /**
     * Extra package-relative patterns treated like `config.patterns`
     * (subject to gitignored-only when enabled).
     */
    extraPatterns?: readonly string[];
    /**
     * When not `none`, also delete every gitignored path under the package
     * (in addition to the normal clean targets).
     */
    fullMode?: CleanFullMode;
    gitignore?: CleanGitignoreBackend;
    packageDir: string;
    rootDir: string;
}
/**
 * Expand absolute path/glob patterns to filesystem entries. When a pattern
 * matches nothing, the pattern itself is kept so callers can still pass it to
 * delete (no-op) and so hard-safety-resolved targets remain visible.
 */
export declare function expandCleanTargets(absolutePatterns: readonly string[]): string[];
export declare function matchesCleanExclude(packageDir: string, absPath: string, exclude: readonly string[]): boolean;
/**
 * Build the set of absolute paths `xy clean` will delete for one package.
 *
 * Pipeline:
 * 1. Hard safety on all configured patterns (throws on escape)
 * 2. Expand builtins + include (always-clean; bypass gitignored-only)
 * 3. Expand config patterns; enforce gitignored-only when enabled
 * 4. Optionally add all gitignored paths (`--full` / `--full-all` or rule)
 * 5. Apply exclude + re-check inside-root
 */
export declare function buildCleanPlan(options: BuildCleanPlanOptions): CleanPlan;
export declare function cleanPlanExitCode(plan: CleanPlan): number;
//# sourceMappingURL=cleanPlan.d.ts.map