import type { DetectedStack } from '../types';
import type { ArchitecturalShape, LanguageId, LanguageSupport } from './types';
export type { ArchitecturalShape, LanguageId, LanguageSupport, LintSeverity } from './types';
export declare const LANGUAGES: readonly LanguageSupport[];
export declare function getLanguage(id: LanguageId): LanguageSupport | undefined;
export declare function detectActiveLanguages(cwd: string): LanguageSupport[];
/**
 * Map a source-file path to its owning language pack by extension,
 * using each pack's declared `sourceExtensions` (pack-driven per
 * CLAUDE.md Rule 6 — no hardcoded ext→lang table). Returns undefined
 * for files no registered pack claims. Longest-extension-wins so a
 * compound extension (e.g. a future `.d.ts`) beats a shorter one.
 */
export declare function languageForFile(filePath: string): LanguageSupport | undefined;
/**
 * Map a `DetectedStack` (or `ResolvedConfig`, which extends it) to the
 * set of `LanguageSupport` packs that are active for the project.
 * Pack-driven via `DetectedStack.languages` keyed on `LanguageId` —
 * adding a pack means extending `LanguageId` + registering in
 * `LANGUAGES`; this function never changes.
 */
export declare function activeLanguagesFromStack(stack: DetectedStack): LanguageSupport[];
/**
 * Same as `activeLanguagesFromStack`, but for callers who only have
 * the `languages` sub-shape (e.g. `tool-registry.ts:buildRequiredTools`
 * receives `DetectedStack['languages']`, not the full stack).
 */
export declare function activeLanguagesFromFlags(flags: DetectedStack['languages']): LanguageSupport[];
/**
 * All source-file extensions across every registered pack, deduplicated.
 * The pack-driven analog of the pre-LP.3 hardcoded
 * `'.ts .tsx .js .jsx .py .go .rs .cs'` constant in `generic.ts` —
 * grows automatically as new packs land.
 */
export declare function allSourceExtensions(): string[];
/**
 * All test-file patterns across every registered pack, deduplicated.
 * Patterns without a slash are basename-style (matched by find `-name`);
 * patterns containing a slash are path-anchored (e.g. Rust's
 * tests-directory glob for integration tests) and need find
 * `-path` semantics — see `splitTestFilePatterns()`.
 */
export declare function allTestFilePatterns(): string[];
/**
 * All auto-generated source-file basename patterns across every
 * registered pack, deduplicated. D028 (2.4.7): consumers (currently
 * `src/analyzers/tools/generic.ts`) build find `-not -name` excludes
 * from this list to keep per-file metrics from being inflated by
 * generated code (designer.cs, *.pb.go, *Generated.java, etc.).
 *
 * Packs that don't declare `autogeneratedSourcePatterns` contribute
 * nothing — the helper returns the union of all declared patterns
 * across active+inactive packs. Conservative by design: a designer.cs
 * file in a polyglot repo with both csharp and go active is still
 * filtered even if the csharp pack happens to be inactive in this
 * cwd's scope.
 */
export declare function allAutogenSourcePatterns(): string[];
/**
 * All doc-comment regex patterns across every registered pack,
 * deduplicated. D027 (2.4.7): consumed by `generic.ts` to build a
 * union grep alternation for `docCommentFiles`. Empty array when no
 * pack declares any patterns — caller short-circuits to 0.
 *
 * Scope mirrors `allAutogenSourcePatterns`: union across all packs
 * (active + inactive). A `///` line in a `.cs` file inside a
 * polyglot repo gets counted even if csharp isn't the dominant pack
 * — the false-positive rate across language boundaries is negligible
 * (e.g. `///` doesn't appear in `.py` files).
 */
export declare function allDocCommentPatterns(): string[];
/**
 * All TLS-bypass regex patterns across every registered pack,
 * deduplicated. D034 (2.4.7): consumed by `generic.ts` to build a
 * union grep alternation for `tlsDisabledCount` — a Security-score
 * input that previously matched only Node-shaped idioms.
 *
 * Scope mirrors `allDocCommentPatterns`: union across all packs
 * (active + inactive). A `.cs` file containing
 * `ServerCertificateValidationCallback = ...` in a polyglot repo
 * gets flagged regardless of which pack the customer "primarily" uses
 * — security findings should never be silently scoped out.
 */
export declare function allTlsBypassPatterns(): string[];
/**
 * Per-pack exported-symbol detection declarations, with pack identity
 * preserved. Unlike the pattern-union helpers above, consumers need to
 * know which pack contributes which reliability + strategy — the
 * api-surface CLI uses this to print "Excluded: ruby pack (reason: ...)"
 * notes, and the dashboard viz uses it to disable the "exported only"
 * filter for nodes from unreliable packs.
 *
 * Scope mirrors `allTlsBypassPatterns`: union across all packs (active
 * + inactive). Returns one entry per pack that declares the field;
 * packs with no declaration are omitted. Consumers treat omitted packs
 * as effectively `'unreliable'` (per the field's declared semantics).
 */
export interface ExportDetectionDeclaration {
    pack: LanguageId;
    reliability: 'full' | 'partial' | 'unreliable';
    strategy: string;
}
export declare function allExportDetectionDeclarations(): ExportDetectionDeclaration[];
/**
 * Cloc language names declared by every pack, deduplicated. D073
 * (2.4.7): consumed by `gatherClocMetrics` to filter cloc's per-
 * language summary + `totalLines` aggregation down to "actual source
 * code" — JSON / XML / CSV / Markdown that cloc emits stay out of the
 * source-line counters that quality's Comment Ratio + health's
 * Documentation derive from. Pre-D073 cloc's `SUM` summed every
 * language including markup/data, deflating the .NET WinForms
 * benchmark's comment ratio (1.6M JSON lines dragged 25%-true C#
 * comment ratio down to
 * 4.3%).
 *
 * Scope mirrors `allAutogenSourcePatterns` — union across active +
 * inactive packs. A `.cs` file in a polyglot repo gets counted even
 * when csharp isn't the detect-time dominant pack, which is fine:
 * cloc names map to languages, not pack-presence signals.
 */
export declare function allClocLanguageNames(): string[];
/**
 * Union of every active pack's `architecturalShape.primaryComponentPaths`,
 * deduplicated. Consumed by `gatherGenericMetrics` to count the
 * primary-component file metric (`HealthMetrics.controllers`) and by
 * the test-gap classifier in `analyzers/tests/gather.ts` to populate
 * the MEDIUM bucket by default.
 *
 * Pre-extension, generic.ts hardcoded `controllers/`, `handlers/`,
 * `views/` and gather.ts hardcoded the same set inline — a pure
 * React frontend or .NET WinForms desktop app matched zero paths
 * and reported empty MEDIUM/HIGH test-gap buckets. Pack-driven
 * union grows automatically as new packs land.
 *
 * Scope is active-only: matching `<dxkit health>` analyzes the
 * project the user is in, not every pack that exists. This keeps
 * Python pack's `views/` from incorrectly matching a Java repo's
 * Spring MVC views layer (cross-pack false positives).
 */
export declare function allPrimaryComponentPaths(flags: DetectedStack['languages']): string[];
/**
 * Union of every active pack's `architecturalShape.routePaths`,
 * deduplicated. Consumed by `gatherGenericMetrics` to populate
 * `HealthMetrics.routeHandlerFiles` — the count gating the "Add API
 * documentation" health action. A WinForms desktop app (.NET pack
 * active but no `Controllers/` directory) reports zero here even when
 * `primaryComponentPaths` matches Forms/ViewModels, so the action
 * stays correctly silenced.
 */
export declare function allRoutePaths(flags: DetectedStack['languages']): string[];
/**
 * Union of every active pack's `architecturalShape.modelPaths`,
 * deduplicated. Consumed by `gatherGenericMetrics` to populate
 * `HealthMetrics.models` (the "data model files" count surfaced in
 * Maintainability prose).
 */
export declare function allModelPaths(flags: DetectedStack['languages']): string[];
/**
 * Per-bucket union of active packs' test-gap path patterns. Empty
 * arrays for any bucket no pack declares. Consumed by
 * `analyzers/tests/gather.ts:classifyRisk` to tier source files into
 * the CRITICAL / HIGH / MEDIUM / LOW buckets.
 *
 * The `medium` bucket defaults to a pack's `primaryComponentPaths`
 * when its `testGapPriority.medium` is omitted — the common case
 * being "any primary component without a matching test is MEDIUM
 * risk at minimum."
 */
export declare function allTestGapPriorityPaths(flags: DetectedStack['languages']): {
    critical: string[];
    high: string[];
    medium: string[];
};
/**
 * Pick the dominant vocabulary for prose rendering. When cloc data is
 * available, the pack with the most source lines wins — the
 * source-files-weighted heuristic plan v4 anchored to. When cloc
 * data isn't available, falls back to registry order. Returns null
 * when no active pack provides a vocabulary — callers fall through
 * to generic words ("components", "models", "routes").
 *
 * The cloc weight closes a polyglot-detection edge case: a
 * 3,000-file C# repo with one stray build-output `.py` file would
 * activate both csharp and python packs, and registry-order picked
 * python's vocabulary (first declared) despite csharp dominating by
 * 4 orders of magnitude. Source-line weighting picks the pack the
 * code is actually written in.
 */
export declare function dominantVocabulary(flags: DetectedStack['languages'], clocLanguages?: ReadonlyArray<{
    name: string;
    lines: number;
}>): NonNullable<ArchitecturalShape['vocabulary']> | null;
/**
 * Split test-file patterns into the two shapes find treats differently:
 * basename patterns (matched via `-name`) and path-anchored patterns
 * (matched via `-path`). Pre-LP.3, generic.ts used only `-name` and
 * silently missed Rust's integration tests under the tests directory
 * because that pattern doesn't match a basename.
 */
export declare function splitTestFilePatterns(patterns?: string[]): {
    nameOnly: string[];
    pathAnchored: string[];
};
/**
 * Build the devcontainer `features` block for a given detected stack.
 * Returns a `{ [featureName]: opts }` map ready to serialize as the
 * value of `features` in `.devcontainer/devcontainer.json`.
 *
 * Always-on entries (Node — dxkit's own runtime; GitHub CLI) land
 * regardless of detected stack so the post-create script can run npm
 * and `gh` even on non-Node projects. Per-pack entries layer on top
 * via object-key dedup, so the typescript pack's node feature
 * overrides the always-on default (e.g. with a different version).
 *
 * Pre-Phase-2.5.1 the features block was a static JSON object that
 * unconditionally enabled every toolchain dxkit supports — pure-TS
 * repos still pulled .NET / Ruby / Java / Rust toolchains (~25 min
 * of unused image build). This helper drives a stack-aware generation
 * path that's testable in isolation.
 */
export declare function buildDevcontainerFeatures(flags: DetectedStack['languages']): Record<string, Record<string, unknown>>;
/**
 * Union the VSCode extensions across active language packs and the
 * always-on dxkit / GitHub baseline. Companion to
 * `buildDevcontainerFeatures` — features install the toolchain
 * (compiler / runtime); extensions drop the editor support (syntax,
 * lint, debug).
 *
 * Always-on extensions are anthropic.claude-code (Claude Code agent
 * surface — the six dxkit-* skills live under it), GitHub Actions +
 * Pull Requests (workflow + PR review skills target them). Per-pack
 * extensions come from `LanguageSupport.devcontainerExtensions`.
 *
 * Output is order-stable (always-on first, then per-pack in language
 * registration order) and deduplicated — a pack accidentally listing
 * an always-on extension, or two packs sharing one, can't generate
 * a duplicate entry. The renderer relies on stable order so unchanged
 * stacks produce byte-identical devcontainer.json output.
 *
 * Pre-extension the devcontainer.json template hardcoded the extensions
 * list with every language's extension. Pure-TS repos pulled the go,
 * rust, csharp, java, kotlin, ruby extensions on every container start
 * (~6 extensions for stacks that don't use those languages); this
 * helper trims to only the active packs' editor support.
 */
export declare function buildDevcontainerExtensions(flags: DetectedStack['languages']): string[];
//# sourceMappingURL=index.d.ts.map