/** Textual model sources. `.kerml` is half the Kernel libraries. */ export declare const MODEL_EXTENSIONS: readonly [".sysml", ".kerml"]; /** The XMI serializations, declared and with implied elements. */ export declare const XMI_EXTENSIONS: readonly [".sysmlx", ".kermlx"]; export declare const LIBRARY_SOURCE_TREE = "sysml.library"; export declare const LIBRARY_XMI_TREE = "sysml.library.xmi"; export declare const LIBRARY_XMI_IMPLIED_TREE = "sysml.library.xmi.implied"; /** The normative textual and graphical grammars. */ export declare const BNF_TREE = "bnf"; export interface CorpusFileEntry { sha256: string; bytes: number; } export interface CorpusTree { id: string; path: string; role: string; files: number; bytes: number; } export interface CorpusManifest { repository: string; /** The Release commit every result is recorded against. */ commit: string; commitDate: string; vendoredAt: string; /** Library name โ†’ version, read off the KPAR filenames. */ libraryVersions: Record; /** One roll-up over every file's path and hash. */ digest: string; trees: CorpusTree[]; files: Record; } export interface Corpus { root: string; manifest: CorpusManifest; } /** * The provenance stamped on every conformance result. * * ยง5.1 item 3: a conformance number that does not say which Release it was * taken against is not a conformance number. It travels with the report so a * baseline comparison can refuse to compare across pins rather than silently * report a regression that is really a corpus change. */ export interface CorpusProvenance { repository: string; commit: string; commitDate: string; digest: string; libraryVersions: Record; } export declare function provenanceOf(corpus: Corpus): CorpusProvenance; export declare class CorpusNotFoundError extends Error { readonly dir: string; constructor(dir: string); } /** * Where the vendored corpus lives, relative to this module. * * `src/conformance/` and `lib/conformance/` sit at the same depth below the * package root, so one expression serves both the compiled and the sources * build without a build-time constant. */ export declare function defaultCorpusDir(): string; export declare function loadCorpus(dir?: string): Corpus; export interface ChecksumMismatch { path: string; reason: 'missing' | 'changed'; } /** * Check vendored content against the manifest. * * `trees` narrows the check โ€” hashing 150 MB to run a report over 1.4 MB of * textual sources costs more than the report. The full sweep is what the * corpus-integrity test runs. */ export declare function verifyCorpus(corpus: Corpus, trees?: readonly string[]): ChecksumMismatch[]; /** * A unit of the corpus that is run and reported as one. * * The library units line up one-for-one with the ten published KPARs, so a * count can be read against the thing the OMG actually ships rather than * against a partition invented here. The examples are two more. */ export interface CorpusUnit { id: string; /** Directory, relative to the corpus root, in upstream's own path shape. */ path: string; kind: 'library' | 'examples'; /** Absolute paths of the model sources in this unit, sorted. */ files: string[]; bytes: number; } /** Every model source under `dir`, absolute and sorted. */ export declare function modelSourcesIn(dir: string): string[]; /** * Partition the corpus into units. * * A library group whose own directory holds sources is one unit (the Systems * Library); otherwise each child directory is (Kernel Libraries, Domain * Libraries). That rule is what produces the ten-way split matching the KPARs, * without this file carrying a hardcoded list of library names that a Release * bump would silently invalidate. */ export declare function corpusUnits(corpus: Corpus): CorpusUnit[]; /** * Select units by id, accepting a prefix so `--unit library` means all of them. * * An unmatched selector is an error rather than an empty run: a conformance * command that reports zero findings because it ran nothing is the worst * possible false green. */ export declare function selectUnits(units: readonly CorpusUnit[], selectors: readonly string[]): CorpusUnit[]; /** * The XMI file that serializes a given library source. * * Upstream mirrors the tree exactly and swaps the extension โ€” * `sysml.library/Systems Library/Parts.sysml` becomes * `sysml.library.xmi.implied/Systems Library/Parts.sysmlx`. */ export declare function xmiCounterpart(corpus: Corpus, source: string, tree: string): string | undefined; /** Corpus-relative path, in upstream's own separator, for reports. */ export declare function corpusRelative(corpus: Corpus, path: string): string; //# sourceMappingURL=corpus.d.ts.map