/**
 * Shallow walk of a directory for `.md` files, with per-file parsing.
 *
 * Extracts the shape repeated across `CustomCommandLoader.scanDirectory`,
 * `SubagentLoader.loadFromDirectory`, and `CustomToolLoader.scanDirectory`:
 * existence check, read dir, filter to `.md`, stat, parse, capture errors.
 *
 * The walk is intentionally non-recursive. Callers that need recursion or
 * namespacing (e.g. the custom-commands loader) handle that themselves and
 * call this helper for each leaf directory. The bundle loader uses it once
 * per `commands/` / `agents/` / `tools/` subdir inside a skill bundle.
 *
 * A missing directory returns an empty result with no error. Any other
 * failure to read the directory is reported as a single error against the
 * directory path; per-file parse failures are reported individually.
 */
export interface ParsedMdFile<T> {
    filePath: string;
    parsed: T;
}
export interface MdLoadError {
    filePath: string;
    error: string;
}
export interface MdLoadResult<T> {
    entries: ParsedMdFile<T>[];
    errors: MdLoadError[];
}
export type MdFileParser<T> = (filePath: string) => T | Promise<T>;
export declare function loadMdDir<T>(dir: string, parse: MdFileParser<T>): Promise<MdLoadResult<T>>;
//# sourceMappingURL=load-md-dir.d.ts.map