/** * Migrate the legacy worktree-include file location to the canonical one. * * Pre-T9983 layout (deprecated): `/.cleo/worktree-include` * Post-T9983 canonical layout: `/.worktreeinclude` * * The canonical location matches Claude Code Desktop, worktrunk-core, and * the broader git-worktree-tooling ecosystem convention. The reader in * `@cleocode/worktree` already prefers the canonical path and emits a * one-time `DeprecationWarning` when only the legacy path is present — * this migrator is the explicit, side-effect-only counterpart that moves * the file with a timestamped backup. * * @task T9983 * @epic T9983 (E6-WORKTREEINCLUDE-MIGRATION) * @saga T9977 (SG-WORKTRUNK-OWN) */ /** * Outcome of {@link migrateWorktreeIncludeFile}. * * @task T9983 */ export interface MigrateWorktreeIncludeResult { /** * `migrated` — legacy → canonical move succeeded. * `noop` — canonical exists or no legacy file present. * `conflict` — BOTH canonical and legacy exist; canonical wins, legacy * backed up out of the way (lossless). * `dry-run` — `dryRun: true` was set; nothing was written. */ action: 'migrated' | 'noop' | 'conflict' | 'dry-run'; /** Canonical path checked or written: `/.worktreeinclude`. */ canonicalPath: string; /** Legacy path checked or moved: `/.cleo/worktree-include`. */ legacyPath: string; /** When `migrated` or `conflict`: path of the timestamped backup. */ backupPath?: string; /** Human-readable summary; safe to echo to stdout. */ message: string; } /** * Migrate `/.cleo/worktree-include` (legacy) to * `/.worktreeinclude` (canonical). * * Decision table: * * | canonical exists | legacy exists | dryRun | action | * |------------------|---------------|--------|------------| * | no | no | - | noop | * | yes | no | - | noop | * | no | yes | true | dry-run | * | no | yes | false | migrated | * | yes | yes | true | dry-run | * | yes | yes | false | conflict | * * In the `conflict` case the canonical file is the source of truth (matches * the {@link loadWorktreeIncludePatterns} resolver in `@cleocode/worktree`). * The legacy file is backed up to `.cleo/backups/worktree-include-.bak` * so no content is lost. * * @param projectRoot - Absolute path to the project root. * @param opts.dryRun - When `true`, return the would-be action without * touching the filesystem. * @returns A {@link MigrateWorktreeIncludeResult} describing what happened. * * @task T9983 */ export declare function migrateWorktreeIncludeFile(projectRoot: string, opts?: { dryRun?: boolean; }): Promise; //# sourceMappingURL=migrate-worktree-include.d.ts.map