export declare const LANGUAGE_EXTENSIONS: { readonly typescript: readonly [".ts", ".tsx"]; readonly javascript: readonly [".js", ".jsx", ".mjs", ".cjs"]; readonly python: readonly [".py", ".pyi"]; readonly go: readonly [".go"]; readonly java: readonly [".java"]; readonly kotlin: readonly [".kt", ".kts"]; readonly rust: readonly [".rs"]; readonly c: readonly [".c"]; readonly cpp: readonly [".cpp", ".cc", ".cxx", ".h", ".hpp", ".hxx"]; readonly csharp: readonly [".cs"]; readonly fsharp: readonly [".fs", ".fsi", ".fsx"]; readonly vbnet: readonly [".vb"]; readonly ruby: readonly [".rb", ".rake", ".gemspec"]; readonly php: readonly [".php", ".phtml"]; readonly swift: readonly [".swift"]; readonly objc: readonly [".m", ".mm"]; readonly scala: readonly [".scala"]; readonly groovy: readonly [".groovy", ".gradle"]; readonly shell: readonly [".sh", ".bash", ".zsh", ".fish"]; readonly powershell: readonly [".ps1"]; readonly sql: readonly [".sql"]; readonly r: readonly [".r"]; readonly lua: readonly [".lua"]; readonly perl: readonly [".pl", ".pm"]; readonly elixir: readonly [".ex", ".exs"]; readonly erlang: readonly [".erl", ".hrl"]; readonly dart: readonly [".dart"]; readonly julia: readonly [".jl"]; readonly haskell: readonly [".hs", ".lhs"]; readonly nim: readonly [".nim", ".nims", ".nimble"]; readonly ocaml: readonly [".ml", ".mli"]; readonly reasonml: readonly [".re", ".rei"]; readonly elm: readonly [".elm"]; readonly zig: readonly [".zig"]; readonly solidity: readonly [".sol"]; readonly vyper: readonly [".vy"]; readonly rego: readonly [".rego"]; readonly verilog: readonly [".v", ".sv", ".vh"]; readonly vhdl: readonly [".vhd", ".vhdl"]; readonly terraform: readonly [".tf", ".tfvars", ".hcl"]; readonly protobuf: readonly [".proto"]; readonly graphql: readonly [".graphql", ".gql"]; readonly prisma: readonly [".prisma"]; readonly thrift: readonly [".thrift"]; readonly capnp: readonly [".capnp"]; readonly jsonnet: readonly [".jsonnet", ".libsonnet"]; readonly nix: readonly [".nix"]; readonly bicep: readonly [".bicep"]; readonly cmake: readonly [".cmake"]; readonly arkts: readonly [".ets"]; readonly astro: readonly [".astro"]; readonly vue: readonly [".vue"]; readonly svelte: readonly [".svelte"]; readonly pug: readonly [".pug"]; readonly freemarker: readonly [".ftl", ".ftlh", ".ftlx"]; readonly handlebars: readonly [".hbs", ".mustache"]; readonly jinja: readonly [".jinja2", ".j2"]; }; export type Ocr18Language = keyof typeof LANGUAGE_EXTENSIONS; export declare const OCR_18_LANGUAGES: readonly Ocr18Language[]; /** * The routed language `filePath` belongs to, or `null` when it is not a routed * format. Three deliberate decisions, all documented rather than assumed: * * - `.mts` / `.cts` are TypeScript to the PRD, but the pinned 1.13.1 allowlist * omits them and `ocr review --preview` reports them `unsupported_ext`. * Routing them would report "typescript: 0 findings" for files the CLI never * read, so they surface as unsupported files instead. * - `.h` is genuinely ambiguous between C and C++. It stays under `cpp` because * that is the surface this slice inherited: at `194eccf5`, `--language cpp` * matched `.h`, and moving it would silently change a single-language result * (the PRD's preserved-behaviour clause). Reassigning it is a deliberate * breaking change and needs its own decision, not a "fix" in passing. One file * maps to one language on purpose: a double assignment would count the same * comment in two `byLanguage` buckets and make the outcome shapes dishonest. * - `.m` is claimed by both Objective-C and MATLAB upstream and cannot be told * apart by extension; it routes to Objective-C, the far more common reading. */ export declare function languageForPath(filePath: string): Ocr18Language | null; export declare function isSupportedLanguage(value: string): value is Ocr18Language; /** * Parse a `--languages` value: `auto`, or a comma-separated list of language * names / extensions (`ts,js,go` or `.ts,.js,go`). Extensions are resolved * through the same routing table, so a token cannot name a language the table * does not route. * * @throws Error with `code: 'LANGUAGE_UNSUPPORTED'` on an unknown or empty token. */ export declare function parseLanguageSelection(spec: string): { readonly auto: true; readonly languages: null; } | { readonly auto: false; readonly languages: readonly Ocr18Language[]; };