import { McpServer } from "@modelcontextprotocol/sdk/server/mcp.js"; import type { RuntimeOptionsExtension } from "./runtime-option-extensions.js"; /** Pi bounds MCP text content at 12,000 characters; leave framing headroom. */ export declare const REQUEST_SCOPED_MCP_MODEL_TEXT_MAX_CHARS = 10000; export declare const REQUEST_SCOPED_MCP_MAX_CURSOR_BYTES = 2048; export declare const REQUEST_SCOPED_MCP_NESTED_RESULT_OMISSION = "[nested history-tool result omitted; inspect the referenced record directly]"; export interface RequestScopedMcpEndpointOptions { readonly serverName: string; readonly startingMessage: string; /** A fresh server is required for every stateless HTTP request. */ readonly createServer: (input: Parameters[0]) => McpServer; readonly onUnavailable?: (error: unknown) => void; } /** * Create one capability-path loopback endpoint per model request. Each HTTP * request gets a fresh MCP server and stateless transport so model failover may * initialize again without inheriting transport state. */ export declare function createRequestScopedMcpRuntimeExtension(options: RequestScopedMcpEndpointOptions): RuntimeOptionsExtension; export declare function requestScopedCurrentRunBlocked(candidateRunId: string, currentRunId: string): boolean; export declare function requestScopedConversationMatches(candidateConversationId: string, requestConversationId: string, rollover: "none" | "daily" | undefined): boolean; export declare function requestScopedNestedResult(toolName: string, aliases: readonly string[], value: unknown, omission?: string): unknown; export declare function splitRequestScopedModelText(section: string): Array<{ readonly type: "text"; readonly text: string; }>; /** Unsigned cursor, matching RunHistory: structure + binding digest provide validation. */ export declare function encodeRequestScopedCursor(value: Readonly>): string; export declare function decodeRequestScopedCursor(cursor: string): Record | undefined; export declare function requestScopedCursorDigest(parts: readonly (string | number | boolean | undefined)[]): string; //# sourceMappingURL=request-scoped-mcp.d.ts.map