/** * CLI LSP Diagnostic Conversion * Convert RillError to LSP Diagnostic format */ import type { RillError } from '@rcrsr/rill'; export interface LspDiagnostic { readonly range: LspRange | null; readonly severity: 1 | 2 | 3; readonly code: string; readonly source: 'rill'; readonly message: string; readonly suggestions?: string[] | undefined; } export interface LspRange { readonly start: LspPosition; readonly end: LspPosition; } export interface LspPosition { readonly line: number; readonly character: number; } /** * Convert RillError to LSP Diagnostic format. * * Constraints: * - LSP uses zero-based line/character positions * - Severity mapping: Error=1, Warning=2, Info=3 * - Source is always 'rill' * - Returns diagnostic with null range when error has no span * * @param error - RillError to convert * @returns LSP Diagnostic */ export declare function toLspDiagnostic(error: RillError): LspDiagnostic;