/** * Filename for the convention shared across worktree-aware tools (Claude Code, * Conductor, OpenAI Codex, git-worktreeinclude, worktrunk): a gitignore-syntax * file at the repository root that lists gitignored files to carry into every * new worktree. */ export declare const WORKTREE_INCLUDE_FILENAME = ".worktreeinclude"; /** * Resolves which files a `.worktreeinclude` file selects, relative to `gitRoot`. * * A file is selected only when both hold: * - it matches a pattern in `.worktreeinclude` (gitignore syntax: comments, * negation with `!`, anchoring with `/`, `**` globs) * - Git already ignores it (nested `.gitignore` files, `.git/info/exclude`, * and `core.excludesfile` all apply) * * This mirrors the safety rule every tool that supports `.worktreeinclude` * documents: listing a pattern never makes a tracked file eligible, and it * never makes an otherwise-untracked-but-not-ignored file eligible either. * * @param gitRoot - Absolute path to the main checkout (repository root) * @returns Repository-relative paths (forward-slash separated, as Git reports them) */ export declare function resolveWorktreeIncludeFiles(gitRoot: string): string[]; /** * Copies the files a `.worktreeinclude` file selects from the main checkout * into a freshly created worktree. No-ops when no `.worktreeinclude` file * exists. Never overwrites a file that already exists at the destination. * * @param gitRoot - Absolute path to the main checkout (repository root) * @param targetWorktreePath - Absolute path to the newly created worktree */ export declare function copyWorktreeIncludeFiles(gitRoot: string, targetWorktreePath: string): void;