/** * MCP over HTTP * * Mounts the CodraGraph MCP server on Express using StreamableHTTP transport. * Each connecting client gets its own stateful session; the LocalBackend * is shared across all sessions (thread-safe — lazy LadybugDB per repo). * * Sessions are cleaned up on explicit close or after SESSION_TTL_MS of inactivity * (guards against network drops that never trigger onclose). */ import type { Express } from 'express'; import type { LocalBackend } from '../mcp/local/local-backend.js'; export declare const MCP_HTTP_ENDPOINT = "/api/mcp"; export declare const UNSUPPORTED_MCP_REST_EXAMPLE = "/api/mcp/tools/list"; export interface McpHttpRouteGuidance { endpoint: string; transport: 'streamable-http'; note: string; unsupportedRestExample: string; powershellHealthCheck: string; clientInstruction: string; } export declare const getMcpHttpRouteGuidance: () => McpHttpRouteGuidance; export declare const getUnsupportedMcpRestRouteResponse: (path: string) => { endpoint: string; transport: "streamable-http"; note: string; unsupportedRestExample: string; powershellHealthCheck: string; clientInstruction: string; error: string; code: string; unsupportedRoute: string; }; export declare function mountMCPEndpoints(app: Express, backend: LocalBackend): () => Promise;