import type { Readable, Writable } from 'node:stream'; import { type AnsweringOptions } from './read.js'; /** * The transport, and one decision that could not go anywhere else. * * The decision is when to produce another generation. Asking a question is a * read of the last value the producer published; it is not permission to ask * Git what changed or to rebuild that value, and {@link readAgain} decides when * the generation held is replaced: expired, or one newer was published. Every answer says when that * generation was produced, so freshness is evidence rather than hidden work, * and a `justAnswer` answer says it was not compared with the checkout. A * refusal from a reused generation, or an answer whose named files changed * since it, is asked again of one read now, as {@link caughtUp} decides for * this server and `variance serve`; `variance ask` and the binary answer from * the published generation and never ask again. * * `tools/surface.check.ts` holds the shape of what is served to the recorded * surface. No prose in this file reaches a client — `initialize` sends a name * and a version — so what is written here is a comment rather than the server's * self-description. */ export interface WorkspaceOptions extends AnsweringOptions { readonly input?: Readable; readonly output?: Writable; } /** * Serve one workspace generation over MCP, refreshing it only when permitted. * * Returns the stop function because stopping is the only thing a caller can * usefully do to a running transport. Ordinary mode checks manifests once before * serving, so a path that is not a workspace fails at startup. `justAnswer` * touches only the recorded generation and lets its absence be the refusal. */ export declare function serveWorkspace(root: string, options?: WorkspaceOptions): () => void; //# sourceMappingURL=server.d.ts.map