/** * Fail-closed contract capture for the ChatGPT-reviewed MCP surface. * * This intentionally uses a real McpServer, real Client, in-memory MCP * transport, and the production registration path. It therefore captures what * tools/list serializes, not an approximation of registration config objects. */ import { Client } from "@modelcontextprotocol/sdk/client/index.js"; import { InMemoryTransport } from "@modelcontextprotocol/sdk/inMemory.js"; import { McpServer } from "@modelcontextprotocol/sdk/server/mcp.js"; export declare const OPENAI_REVIEW_CONTRACT_VERSION = 6; export declare const OPENAI_REVIEW_BUSINESS_TOOL_COUNT = 33; export declare const OPENAI_REVIEW_TOTAL_TOOL_COUNT = 33; export type JsonValue = null | boolean | number | string | JsonValue[] | { [key: string]: JsonValue; }; export interface OpenAIReviewTool extends Record { name: string; } export interface OpenAIReviewContract { contractVersion: number; tools: OpenAIReviewTool[]; prompts: JsonValue[]; resources: JsonValue[]; oauth: Record; } export interface OpenAIReviewMcpSurface { tools: OpenAIReviewTool[]; prompts: JsonValue[]; resources: JsonValue[]; } export interface OpenAIReviewSdkRuntime { Client: typeof Client; InMemoryTransport: typeof InMemoryTransport; McpServer: typeof McpServer; } /** Capture the exact OpenAI full-description surface with a caller-selected SDK tree. */ export declare function captureOpenAIReviewMcpSurfaceWithRuntime(sdkRuntime: OpenAIReviewSdkRuntime): Promise; /** Capture the package-local surface; deploy gates inject the Worker runtime. */ export declare function captureOpenAIReviewMcpSurface(): Promise; export declare function buildOpenAIReviewContract(surface: OpenAIReviewMcpSurface, oauth: Record): OpenAIReviewContract; /** Canonicalize object-key and tools/list order only; arrays remain semantic. */ export declare function canonicalizeOpenAIReviewContract(contract: OpenAIReviewContract): OpenAIReviewContract; export declare function serializeOpenAIReviewContract(contract: OpenAIReviewContract): string; /** * Fail closed on any semantic drift from the reviewed descriptor snapshot. */ export declare function assertOpenAIReviewContract(actual: OpenAIReviewContract, expected: OpenAIReviewContract): void; //# sourceMappingURL=openai-review-contract.d.ts.map