/** Who is complaining. See the table above — this drives canvas behaviour. */ export type DiagnosticDomain = 'sysml' | 'memo-ingest' | 'memo-methodology'; export type DiagnosticSeverity = 'error' | 'warning' | 'info'; /** 1-based line and column, matching every tool's own numbering. */ export interface DiagnosticPosition { line: number; column: number; } export interface DiagnosticRange { start: DiagnosticPosition; /** Absent when the tool reported a point rather than a span. */ end?: DiagnosticPosition; } export interface Diagnostic { domain: DiagnosticDomain; /** Provider ID that produced this, e.g. the value of `toolchain.validator`. */ provider: string; /** Version string the provider reported, when it reports one. */ providerVersion?: string; severity: DiagnosticSeverity; message: string; /** Absolute path when the provider gave one; otherwise as the tool wrote it. */ file?: string; range?: DiagnosticRange; /** * The provider's own stable rule code, carried through verbatim. * * `syside` publishes 151 kebab-case codes (`reference-error`, * `accept-action-usage-parameters`, …). We do not renumber them into a * parallel MEMO scheme: suppression and configuration are by code, and a * project's suppressions have to survive both a provider upgrade and an * eventual engine swap. */ code?: string; } /** * Default severity for a domain. * * A provider that reports its own severity always wins; this is for diagnostics * MEMO itself synthesizes, where the domain is the only thing known. */ export declare function defaultSeverityForDomain(domain: DiagnosticDomain): DiagnosticSeverity; /** * One GNU-style line: * `file:line:col: severity: message [code] [domain/provider]` * * The leading `file:line:col: severity:` prefix is what every editor and CI * annotator already parses. The trailing brackets are additive, so a tool that * only understands the GNU prefix still gets a usable line. */ export declare function formatDiagnosticText(diagnostic: Diagnostic): string; export declare function formatDiagnosticsText(diagnostics: readonly Diagnostic[]): string; export declare function diagnosticsToJson(diagnostics: readonly Diagnostic[], pretty?: boolean): string; /** Count by severity — used by commands deciding an exit code. */ export declare function countBySeverity(diagnostics: readonly Diagnostic[]): Record; export declare function diagnosticsInDomain(diagnostics: readonly Diagnostic[], domain: DiagnosticDomain): Diagnostic[]; //# sourceMappingURL=diagnostic.d.ts.map