/** * The Skaile home dir — root for user-scope, machine-global state * (`skaile.yaml` SSOT, `skaile.lock.yaml`, `cache/`, `config.yaml`). * `$SKAILE_HOME` wins (tests point it at a temp dir); else `~/.skaile`. */ export declare function globalSkaileDir(): string; /** * The global cache root. `$SKAILE_CACHE_DIR` (now the cache *root*, not the * repos dir) wins; else `$SKAILE_HOME/cache`; else `~/.skaile/cache`. */ export declare function globalCacheRoot(): string; /** * One-time whole-tree migration: if `newPath` is absent but `legacyPath` exists, * `rename()` legacy → new. Best-effort — a cross-device/raced rename is swallowed * (the caller's dir is re-derivable). Returns `newPath` always. Memoized per * `newPath` so hot resolvers don't stat on every call. */ export declare function migrateLegacyDir(newPath: string, legacyPath: string): string; /** * Per-entry merge: move each immediate child of `legacyDir` that passes `filter` * into `targetDir/`, skipping names already present in `targetDir`. Used * where two legacy roots feed one new root (so a whole-tree rename would clobber * or orphan). Removes `legacyDir` if it ends up empty. Idempotent; memoized per * `targetDir|legacyDir` pair. * * @param filter - receives the absolute child path; return true to move it. */ export declare function mergeLegacyEntriesInto(targetDir: string, legacyDir: string, filter: (childAbsPath: string) => boolean): void; /** * Key-aware per-entry merge: like {@link mergeLegacyEntriesInto}, but each moved * child is placed at `targetDir/` instead of preserving * the bare `name`. Used to migrate legacy bare-name clones (`~/.skaile/sources/cli`) * into the URL-keyed cache layout (`/sources///`) so a * later URL-keyed lookup finds them. `remap` returning `null`/`undefined` (or a * value equal to `name`) falls back to preserving the bare name. * * Nested target keys (`host/owner/repo`) create intermediate dirs. Skips a child * when its computed target already exists (don't clobber). Removes `legacyDir` * if it empties. Idempotent; memoized per `targetDir|legacyDir` pair. * * @param filter - receives the absolute child path; return true to consider it. * @param remap - receives `(childAbsPath, name)`; returns the target key (a * possibly-nested relative path) or a falsy value to keep `name`. */ export declare function mergeLegacyEntriesKeyed(targetDir: string, legacyDir: string, filter: (childAbsPath: string) => boolean, remap: (childAbsPath: string, name: string) => string | null | undefined): void; /** Test-only: reset migration memoization between cases. */ export declare function __resetCacheMigrationMemo(): void; //# sourceMappingURL=cache-paths.d.ts.map