@code-yeongyu/senpi
Version:
Coding agent CLI with read, bash, edit, write tools and session management
16 lines • 1.09 kB
TypeScript
export declare const MAX_PARENT_CONFIG_SEARCH_DEPTH = 100;
/**
* Finds the nearest non-symlinked config directory between cwd and home.
* Home is excluded so its config remains the global fallback layer. The walk also stops
* at the account-database home (read once per process), so a redirected `$HOME` (tests,
* sandboxes) can never adopt the real account's config directory as project config
* (#6459). When the account's home is the filesystem root, it is not a stop boundary:
* legacy root-level discovery for such service accounts is preserved.
*
* A flat-layout product has no marker subdirectory to look for, so it passes
* `requiredChildFile` instead: the directory only counts as a config directory when it
* actually holds that file. Without it, any same-named directory used for something else
* would be mistaken for agent config.
*/
export declare function findNearestParentConfigDir(cwd: string, homeDir: string, configDirName: string, requiredChildDir?: string, requiredChildFile?: string): string | undefined;
//# sourceMappingURL=nearest-parent-config.d.ts.map