/**
 * Leaf migrator: fold ~/.agents-system/ into ~/.agents/.system/.
 *
 * Kept separate from migrate.ts so the always-on startup hop (index.ts) does
 * not load the hosts/routine/teams/daemon/menubar graph that migrate.ts's
 * static imports pull in (RUSH-2454). migrate.ts re-exports and still calls
 * foldLegacySystemRepo() at the top of runMigration().
 *
 * HOME is resolved at call time (not module load) so tests can point at a
 * fixture tree via process.env.HOME without cache-busting the module.
 */
/**
 * Fold ~/.agents-system/ into ~/.agents/.system/.
 *
 * MUST run first in runMigration() — every other migrator reads SYSTEM_DIR
 * (the new path), so the contents have to be there before they execute.
 *
 * Strategy:
 *   1. If legacy dir doesn't exist or is already a symlink, no-op.
 *   2. If new path doesn't exist yet, rename in one shot (fast path).
 *   3. If both exist (mid-migration / re-run on partially-migrated state),
 *      merge legacy → new with new winning on collision, then drop legacy.
 *
 * After the contents move, the legacy path becomes a symlink → SYSTEM_DIR
 * so external tooling that still references ~/.agents-system/ keeps
 * resolving correctly. The symlink is harmless on its own and can be
 * removed with `rm ~/.agents-system` once everything has updated.
 *
 * Idempotent: re-running converges to "contents at SYSTEM_DIR, symlink at
 * LEGACY_SYSTEM_DIR" without duplicating data.
 */
export declare function foldLegacySystemRepo(): void;
export declare function copyDirSkipExisting(src: string, dest: string): void;
