import type { RAGServerConfig } from './types.js'; /** * Bounded BFS scan of a single base directory for supported files, * excluding system-managed paths (dbPath, cacheDir). Returns sorted * absolute paths plus a list of non-fatal warnings. * * Behavior contract: * - Depth is bounded by {@link MAX_SCAN_DEPTH}, mirroring the * CLI ingest walker so the same "how deep do we look under a root" * boundary applies to every list/ingest surface. * - A `readdir` failure under one directory is captured as a warning * rather than aborting the whole list call. One unreadable root must not * hide files under the other roots, so the multi-root contract makes this * asymmetry user-visible, so the policy is now best-effort per root. * - Symlinks are skipped (mirrors the CLI ingest walker). */ export declare function scanBaseDir(baseDir: string, excludePaths: readonly string[]): Promise<{ files: string[]; warnings: string[]; }>; /** * Normalize both {@link RAGServerConfig} shapes into a single * `{ baseDirs, baseDir }` pair. * * Exactly one of `baseDir` / `baseDirs` is supplied (enforced by the * discriminated union in `RAGServerConfig`); the runtime check below catches * misuse from JS-only callers and degraded-mode bugs. * * Empty `baseDirs` is accepted ONLY in degraded mode (configError set). In * that case the server stays constructible so `status` remains callable, but * every root-dependent tool fails fast via `assertConfigOk` before any * baseDirs-dependent work. Without configError, an empty array is a misuse: * reject up front rather than build a parser that silently rejects every path. * * `baseDir` is the legacy single-root accessor derived from `baseDirs[0]` — * empty-string when in degraded mode with an empty `baseDirs` array. It is * never consulted in degraded mode because `assertConfigOk` fires before any * handler reaches it. */ export declare function normalizeBaseDirs(config: RAGServerConfig): { baseDirs: string[]; baseDir: string; }; //# sourceMappingURL=list-scanner.d.ts.map