/**
 * Worktree include-pattern parsing and application.
 *
 * Reads the project's include patterns (gitignore-syntax) and creates symlinks
 * from the worktree back to the project tree for matched paths. The actual
 * pattern matching is delegated to `@cleocode/worktree-napi`'s
 * `readWorktreeInclude` which uses `ignore::gitignore` under the hood — a real
 * glob matcher that replaces the prior `existsSync`-on-literal-pattern bug.
 *
 * Canonical file: `<projectRoot>/.worktreeinclude` (multi-language native;
 * matches the worktrunk-core spec, Claude Code Desktop, etc.).
 *
 * Legacy file: `<projectRoot>/.cleo/worktree-include` (1-cycle deprecation —
 * still read when `.worktreeinclude` is absent, with a one-time stderr warning).
 *
 * @task T9982
 * @task T1161
 */
import type { WorktreeIncludePattern } from '@cleocode/contracts';
/**
 * Load and parse the project's worktree-include file.
 *
 * Resolution order (T9982):
 * 1. `<projectRoot>/.worktreeinclude` — canonical multi-language native path
 *    consumed directly by `napi.readWorktreeInclude` (real ignore::gitignore
 *    matcher).
 * 2. `<projectRoot>/.cleo/worktree-include` — 1-cycle deprecation fallback
 *    that copies the legacy file into a temp `.worktreeinclude` shim so the
 *    napi reader still applies real glob semantics. Emits a one-time
 *    `DeprecationWarning` via `process.emitWarning`.
 *
 * Returns an empty array if neither file exists. The napi binding handles
 * blank lines, comments (`#`-prefixed), and negation (`!`-prefixed) per the
 * gitignore spec.
 *
 * @param projectRoot - Absolute path to the project root.
 * @returns Parsed include patterns, or empty array when no file is present.
 *
 * @task T9982
 * @task T1161
 */
export declare function loadWorktreeIncludePatterns(projectRoot: string): WorktreeIncludePattern[];
/**
 * Apply include patterns to a newly created worktree by copying files
 * from the project root using @cleocode/worktree-napi's parallel reflink-aware
 * copy primitive.
 *
 * Each non-negated pattern is copied from `<projectRoot>/<pattern>` to
 * `<worktreePath>/<pattern>`. Negated patterns are excluded.
 *
 * Unlike the prior symlink-based implementation (removed in T10077), this
 * produces full file copies so worktree isolation is preserved — modifying
 * a file in one worktree does not affect any other worktree.
 *
 * The NAPI binding uses 4-thread rayon parallelism with reflink probing
 * (APFS clonefile on macOS, btrfs/xfs/zfs reflink on Linux, regular copy
 * fallback on other FS).
 *
 * Already-existing paths in the worktree are left untouched by the NAPI
 * layer (the `force` option defaults to `false`).
 *
 * @param patterns - Parsed include patterns from {@link loadWorktreeIncludePatterns}.
 * @param projectRoot - Absolute path to the project root (source base).
 * @param worktreePath - Absolute path to the worktree directory (target base).
 * @returns Array of patterns that were successfully copied.
 *
 * @task T10077
 */
export declare function applyIncludePatterns(patterns: readonly WorktreeIncludePattern[], projectRoot: string, worktreePath: string): WorktreeIncludePattern[];
//# sourceMappingURL=worktree-include.d.ts.map