export interface WorkingDirectoryDeps { cwd: () => string; chdir: (directory: string) => void; exists: (directory: string) => boolean; /** The shell's logical working directory; still set after the directory is removed. */ pwd: string | undefined; home: string; } export interface RecoveredWorkingDirectory { missing: string | undefined; recovered: string; } /** * When the shell's working directory was removed (e.g. `crew cleanup` run from * inside a worktree an earlier cleanup deleted), every `process.cwd()` call — * including cosmiconfig's at module load — throws ENOENT. Move to the nearest * surviving ancestor of `$PWD`, or the home directory, so commands can still run. * Returns undefined when the working directory is intact. */ export declare function recoverWorkingDirectory(deps?: WorkingDirectoryDeps): RecoveredWorkingDirectory | undefined; //# sourceMappingURL=workingDirectory.d.ts.map