import type { z } from "zod"; import type { SettingsLoader } from "../define-settings.js"; export interface LoadedUserConfig { /** Absolute path of the loaded config file. */ path: string; /** The settings loader exported as `default` (or `settings`). */ loader: SettingsLoader, Record, Record>; } /** * Resolve and load the user's settings loader. Three strategies, tried * in order: * * 1. `--config ` (or the `path` argument here) — load that file * directly. * 2. Auto-discover one of {@link CANDIDATE_FILES} in `cwd`. * 3. Walk up the directory tree, checking each parent for the same * candidate files, stopping at a workspace/repo marker (`.git`, * `pnpm-workspace.yaml`, `turbo.json`, etc.) or the filesystem * root. This matches the behavior of `tsc`, `eslint`, and other * cosmiconfig-based tools. * * The loaded module must expose either a default export or a `settings` * named export that is a {@link SettingsLoader} (i.e. the return value * of `defineSettings({...})`). */ export declare function loadUserConfig(explicitPath?: string, cwd?: string): Promise; /** * Walk from `start` toward the filesystem root, returning the first * candidate config file found. Halts when a STOP_MARKER appears in the * current directory without a matching config — the marker signals a * workspace/repo boundary. * * Exported for testing. */ export declare function findConfigUpwards(start: string): string | undefined; //# sourceMappingURL=load-user-config.d.ts.map