export type CheckSeverity = 'error' | 'warning'; export type CheckCategory = 'declaration' | 'call' | 'return' | 'parse' | 'semantic'; /** A single CLI-level diagnostic, normalized across every library checker. */ export interface CheckDiagnosticOut { /** Path relative to the resolved scan root. */ file: string; /** 1-based line, or null when the library diagnostic carries no location. */ line: number | null; /** 1-based column, or null when unavailable. */ column: number | null; severity: CheckSeverity; category: CheckCategory; /** Library rule id, verbatim. */ rule: string; /** Human-readable reason, verbatim from the library diagnostic. */ message: string; } export interface CheckSummary { filesScanned: number; filesWithParseErrors: number; diagnosticCount: number; errorCount: number; warningCount: number; returnChecksRun: number; durationMs: number; } export interface CheckReport { schemaVersion: '1.0'; tool: 'kern-check'; checkerVersion: string; root: string; diagnostics: CheckDiagnosticOut[]; summary: CheckSummary; } export interface RunCheckOptions { withSemantics: boolean; } /** * Pure exit-code decision. Unit-testable without IO. * * - ≥1 error-severity diagnostic → 1 * - ≥1 warning-severity diagnostic AND `strict` → 1 * - otherwise → 0 */ export declare function exitCodeFor(summary: CheckSummary, strict: boolean): 0 | 1; /** * Read the version of `@kernlang/check` from its installed package.json by * ascending from this module's directory to the nearest * `node_modules/@kernlang/check/package.json`. The package's `exports` map does * not expose `./package.json`, so we read the file directly rather than via * module resolution. Falls back to `'unknown'` if it cannot be located. */ export declare function readCheckerVersion(): string; /** * Run the type-checker (and, optionally, semantic validation) over a file or * directory and produce the stable {@link CheckReport}. Pure with respect to * process state apart from reading the filesystem. */ export declare function collectCheck(target: string, opts: RunCheckOptions): CheckReport; export declare function runCheck(args: string[]): Promise;