/** * Shared file-discovery scaffolding for the tree-sitter graph adapters. * * The discover template is byte-identical across graph-go / graph-java / * graph-python / graph-rust save four data inputs: * * - `extension` — the source-file extension to glob (`.go`, …). * - `excludedDirGlobs` — vendored / build-output / VCS dirs to skip. * - `configCandidates` — the ordered config-file precedence list * (resolved-deps first, e.g. `['go.sum','go.mod']`). * - `languageId` — the `graph:discover:` log tag. * * `createDiscover` closes over those and returns the adapter's * `discoverFiles(input): DiscoverOutput`. The collect loop, the symlink * realpath/dedup/sort normalization (so I-9 referential transparency * holds), and the `DiscoverOutput` assembly are shared verbatim. */ import type { DiscoverInput, DiscoverOutput } from '@opensip-tools/graph'; /** Per-language inputs to the shared discover template. */ export interface TreeSitterDiscoverConfig { /** Source-file extension WITHOUT the leading dot, e.g. `'go'`, `'py'`. */ readonly extension: string; /** Directory globs to exclude from the recursive source-file walk. */ readonly excludedDirGlobs: readonly string[]; /** * Ordered config-file precedence list (resolved-deps first). The first * candidate that exists at the project root becomes the cacheKey anchor. */ readonly configCandidates: readonly string[]; /** Log-tag suffix for `graph:discover:`. */ readonly languageId: string; } /** Builds the adapter's `discoverFiles` from per-language config. */ export declare function createDiscover(config: TreeSitterDiscoverConfig): (input: DiscoverInput) => DiscoverOutput; //# sourceMappingURL=discover.d.ts.map