import { type VerifyOptions } from '@nacre.work/api'; import { type Layers, type ToolRunner, type SkillSource } from './factory.js'; /** * MCP over STDIO, for a developer agent on a laptop. * * The transport differs from Streamable HTTP in two ways and no others: the * caller is authenticated once from `NACRE_SERVICE_KEY` instead of per request, * and messages arrive as newline-delimited JSON on stdin. Everything behind * that — the catalog, the tools, the resolver — is the same `McpServer` the * HTTP transport builds, from the same factory. * * **Local mode gets no relaxation of any kind.** The permissions are exactly * the service account's, computed by the same code, and there is no * developer-convenience path that skips the layer bound because the process * happens to be on the same machine as the operator. docs/mcp.md says so and * this is where it would be tempting to differ. * * stdout carries the protocol and nothing else. The SDK's transport writes * frames there; diagnostics go through the process logger, which `stdio-main` * has pointed at stderr — a stray line in the middle of the stream is a frame * the client cannot parse. */ export interface StdioOptions { readonly verify: VerifyOptions; readonly serviceKey: string; readonly layers: Layers; readonly tools: ToolRunner; /** The base skill `instructions` carry. Absent, the built-in text alone. */ readonly skills?: SkillSource; readonly input?: NodeJS.ReadableStream; /** What `initialize` and `server/discover` report. See the note in main.ts. */ readonly serverVersion?: string; /** The API's canonical origin, for the views. See `ServerBuild.apiOrigin`. */ readonly apiOrigin?: string; } /** * Serve until stdin closes. * * Resolves when the stream has ended and every request on it has been * answered, so a caller can shut its pool down afterwards rather than guessing * when the client went away. */ export declare function serveStdio(options: StdioOptions): Promise; //# sourceMappingURL=stdio.d.ts.map