/** * The administrative MCP: one `McpServer` per request, for an organization * administrator's connection. docs/mcp-admin.md. * * A second factory, which `transport-parity.test.ts` would refuse if it were a * second copy of the first: that suite exists because two dispatchers serving * **one** protocol surface diverged. This is a different surface — other * tools, other instructions, prompts the first does not declare, and a token * the first refuses — and it is served on one transport only, so there is no * pair of it to diverge. The parity suite names it as the one exemption, with * this reason. * * What it shares with the first is everything the SDK does and the wrapper * that keeps a thrown error's message off the wire. */ import { McpServer } from '@modelcontextprotocol/server'; import type { AuthContext } from '@nacre.work/api'; import type { AdminRunner } from './admin-services.js'; import { type AdminView, type McpMetrics } from './factory.js'; export interface AdminServerBuild { readonly auth: AuthContext; readonly requestId: () => string; readonly tools: AdminRunner; readonly serverVersion?: string; readonly observe?: McpMetrics; /** * Whether the client renders MCP Apps, as `Verified.ui` reads it. `false` — * a modern-era client that declared no UI extension — drops the panel's two * buttons, which nothing but a panel can press. The writes stay: what they * propose waits on the console's Proposals screen. */ readonly ui?: boolean; } /** The change panel. Served on this surface only; the ordinary one never lists it. */ export declare const CHANGE_VIEW = "ui://nacre/change.html"; /** * The reads that open a panel, and which. docs/mcp-admin.md, "Panels". A read * not named here answers in text only. Each panel reaches the server through * the host with the same token and the same checks as the model's call — what * it adds is that a person can press an actor, page the log or revoke a * connection without asking the model to. */ export declare const READ_PANELS: Readonly>>; export declare const panelUri: (view: AdminView) => string; /** Tools and prompts, neither of which changes during a session. */ export declare const ADMIN_CAPABILITIES: { readonly tools: { readonly listChanged: false; }; readonly prompts: { readonly listChanged: false; }; }; /** * The workflows worth doing the same way every time: MCP's user-invoked * prompts, the slash commands a person picks in their client. Each reads and * explains; where one ends in a change, it ends in a proposal the person * applies, like every write here. * * Arguments are strings because MCP's prompt arguments are, and each says so * in its description rather than letting a client guess a format. */ export interface AdminPrompt { readonly name: string; readonly title: string; readonly description: string; readonly arguments: Readonly>; readonly text: (args: Readonly>) => string; } export declare const ADMIN_PROMPTS: readonly AdminPrompt[]; /** * The server for one request. * * `instructions` is `ADMIN_INSTRUCTIONS` and nothing else — no skill of any * level is read here, so there is no skill source to pass. T39. */ export declare function buildAdminServer(build: AdminServerBuild): McpServer; //# sourceMappingURL=admin.d.ts.map