/** * Language detection for the `graph` CLI. Scans the project root for * known language marker files (tsconfig.json, Cargo.toml, pyproject.toml, * etc.) and returns the set of canonical adapter ids that apply. All * matched adapters apply simultaneously (polyglot per spec D6). * * Detection is filtered by the registry — markers whose adapter isn't * registered in the current CLI bootstrap are reported in * `matchedMarkers` but excluded from `adapterIds`. */ import { type LanguageRegistry } from '@opensip-cli/core'; interface DetectionMatch { readonly marker: string; readonly adapterId: string; } /** * Result of a project-root language scan. `adapterIds` is the * authoritative list of adapters the CLI should query; `matchedMarkers` * is diagnostic context (which marker files fired, useful for error * messages when an adapter is unregistered). */ export interface DetectionResult { /** Canonical adapter ids of the languages detected at `rootDir`. */ readonly adapterIds: readonly string[]; /** Marker files actually found, paired with the adapter they identified. */ readonly matchedMarkers: readonly DetectionMatch[]; } /** * Scan the project root for known language marker files. Returns ALL * matched adapter ids (polyglot supported). Only adapters registered * with the given registry are surfaced — if an adapter isn't registered, * its markers are still recorded in `matchedMarkers` but filtered from * `adapterIds` (defensive against partial CLI bootstrap configurations). */ export declare function detectLanguages(rootDir: string, registry: LanguageRegistry): DetectionResult; export {}; //# sourceMappingURL=detect.d.ts.map