import type { JsonRpcClient } from "./jsonrpc.js"; import type { LspDiagnostic, LspDocumentSymbol, LspHover, LspLocation, LspPublishDiagnosticsParams, LspServerCapabilities, LspSymbolInformation, LspWorkspaceEdit } from "./types.js"; /** * A single managed LSP server connection: initialize handshake, document * synchronization (full-document sync), semantic requests, rename and * diagnostics delivery. * * Health/authority: this client issues requests but NEVER treats server * responses as trusted instructions. All request results are read-only * semantic data. */ export interface LspClientOptions { rpc: JsonRpcClient; rootUri: string; workspaceRoot: string; onDiagnostics?: (params: LspPublishDiagnosticsParams) => void; } export declare function toFileUri(absPath: string): string; export declare function uriToPath(uri: string): string | null; export declare class LspClient { private rpc; readonly rootUri: string; readonly workspaceRoot: string; private onDiagnostics?; private capabilities; private initialized; private version; private openUris; constructor(opts: LspClientOptions); initialize(): Promise; getCapabilities(): LspServerCapabilities | null; /** Open a document with full-document sync. */ openDocument(uri: string, text: string): Promise; /** Full-document change (sync mode 1 = Full). */ changeDocument(uri: string, text: string): Promise; closeDocument(uri: string): Promise; definition(params: { uri: string; line: number; character: number; }): Promise; references(params: { uri: string; line: number; character: number; }): Promise; implementations(params: { uri: string; line: number; character: number; }): Promise; hover(params: { uri: string; line: number; character: number; }): Promise; documentSymbols(uri: string): Promise; workspaceSymbols(query: string): Promise; prepareRename(params: { uri: string; line: number; character: number; }): Promise<{ range: unknown; } | null>; rename(params: { uri: string; line: number; character: number; newName: string; }): Promise; shutdown(): Promise; dispose(): void; rejectAllPending(reason: string): void; diagnosticStderr(): string; } export type { LspDiagnostic }; //# sourceMappingURL=client.d.ts.map