import { d as SDCPN, p as ScenarioParameter } from "./sdcpn-CayOVwJM.js";
import { Diagnostic, DocumentUri, Position, TextDocumentIdentifier } from "vscode-languageserver-types";

//#region src/lsp/worker/protocol.d.ts
/**
 * Parameters for `textDocument/publishDiagnostics` notification.
 * Defined here rather than pulling in `vscode-languageserver-protocol`.
 */
type PublishDiagnosticsParams = {
  uri: DocumentUri;
  diagnostics: Diagnostic[];
};
/**
 * Data describing a scenario editing session for the language server.
 */
type ScenarioSessionParams = {
  sessionId: string;
  scenarioParameters: ScenarioParameter[]; /** Parameter ID → expression string */
  parameterOverrides: Record<string, string>; /** Place ID → expression string (used when initialStateAsCode is false) */
  initialState: Record<string, string>; /** Full code for "Define as code" initial state mode (used when initialStateAsCode is true) */
  initialStateCode?: string; /** Which initial state mode is active. Only the active mode's files are linted. */
  initialStateAsCode: boolean;
};
/**
 * Data describing a metric editing session for the language server.
 */
type MetricSessionParams = {
  sessionId: string; /** Metric function body (must `return` a finite number). */
  code: string;
};
/** Position in a text document (LSP standard: line/character based). */
type TextDocumentPositionParams = {
  textDocument: TextDocumentIdentifier;
  position: Position;
};
/** Notifications (fire-and-forget, no response expected). */
type ClientNotification = {
  jsonrpc: "2.0";
  method: "initialize";
  params: {
    sdcpn: SDCPN;
  };
} | {
  jsonrpc: "2.0";
  method: "sdcpn/didChange";
  params: {
    sdcpn: SDCPN;
  };
} | {
  jsonrpc: "2.0";
  method: "textDocument/didChange";
  params: {
    textDocument: TextDocumentIdentifier;
    text: string;
  };
} | {
  jsonrpc: "2.0";
  method: "temp/scenario/initialize";
  params: ScenarioSessionParams;
} | {
  jsonrpc: "2.0";
  method: "temp/scenario/didChange";
  params: ScenarioSessionParams;
} | {
  jsonrpc: "2.0";
  method: "temp/scenario/kill";
  params: {
    sessionId: string;
  };
} | {
  jsonrpc: "2.0";
  method: "temp/metric/initialize";
  params: MetricSessionParams;
} | {
  jsonrpc: "2.0";
  method: "temp/metric/didChange";
  params: MetricSessionParams;
} | {
  jsonrpc: "2.0";
  method: "temp/metric/kill";
  params: {
    sessionId: string;
  };
};
/** Requests (expect a response with matching `id`). */
type ClientRequest = {
  jsonrpc: "2.0";
  id: number;
  method: "textDocument/completion";
  params: TextDocumentPositionParams;
} | {
  jsonrpc: "2.0";
  id: number;
  method: "textDocument/hover";
  params: TextDocumentPositionParams;
} | {
  jsonrpc: "2.0";
  id: number;
  method: "textDocument/signatureHelp";
  params: TextDocumentPositionParams;
};
/** Any message from the main thread to the worker. */
type ClientMessage = ClientNotification | ClientRequest;
/** A successful response to a request. */
type ServerResponse<Result = unknown> = {
  jsonrpc: "2.0";
  id: number;
  result: Result;
} | {
  jsonrpc: "2.0";
  id: number;
  error: {
    code: number;
    message: string;
  };
};
/** Server-initiated notifications (no `id`). */
type ServerNotification = {
  jsonrpc: "2.0";
  method: "textDocument/publishDiagnostics";
  params: PublishDiagnosticsParams[];
};
/** Any message from the worker to the main thread. */
type ServerMessage = ServerResponse | ServerNotification;
//#endregion
export { ServerMessage as a, ScenarioSessionParams as i, MetricSessionParams as n, TextDocumentPositionParams as o, PublishDiagnosticsParams as r, ClientMessage as t };
//# sourceMappingURL=protocol-CdK67XNp.d.ts.map