import { type MemoIr, type ProtocolCapability } from './protocol.js'; export interface SysmlcClientOptions { /** Executable to run, already resolved by the adapter. */ command: string; /** Extra arguments before `serve --stdio`, e.g. a node script path. */ args?: readonly string[]; projectDir: string; /** Provider ID, used only to make a missing-tool error name the right thing. */ providerId: string; } /** * A live compiler process. * * The handshake is standard LSP. The one thing checked beyond it is the * protocol version the server advertises, because a boundary that is not * checked is a boundary that silently is not one. */ export declare class SysmlcClient { private readonly options; private child?; private connection?; private starting?; private revision; /** * In-flight requests, with the source selector each one asked about. * * The selector is not bookkeeping: supersession resolves by waiting for a * newer in-flight request, and that is only the same answer when the newer * request asked the same question. Two requests against one project with * different file sets are different questions. */ private readonly pending; private capability?; private disposed; constructor(options: SysmlcClientOptions); /** What the server said about itself, once the handshake has happened. */ get serverCapability(): ProtocolCapability | undefined; private start; private spawnAndHandshake; private forget; /** * Keep the event loop alive only while a request is outstanding. * * Without this a one-shot `memo` command would hang on a server that is * perfectly healthy and simply still running. The server survives between * commands within one process — which is the point — but it never becomes * the reason the process will not exit. */ private idle; private active; /** * Child stdio are pipes, and a pipe holds the event loop open. Node types * them as plain streams, so the ref/unref every pipe actually has is * reached by feature test rather than by cast. */ private holdStreams; /** * Ask for the IR of the current revision. * * Every call takes a new revision token. If a newer one overtakes it while * the server is working, the server refuses to answer with the older result * and says which revision superseded it — and this method then waits for * *that* answer. The caller cannot be handed a stale model; the worst case * is that it waits slightly longer for a fresher one. * * `files` narrows the request to an explicit source list (protocol 1.1.0). * Omitted, the server lowers the project — which is what every caller but * conformance wants. */ emitIr(files?: readonly string[]): Promise; private send; dispose(): Promise; } export declare function getSysmlcClient(options: SysmlcClientOptions): SysmlcClient; /** Shut every pooled server down. Long-running hosts call this on teardown. */ export declare function disposeSysmlcClients(): Promise; //# sourceMappingURL=sysmlc-client.d.ts.map