import { type ToolContext } from './tools.js'; /** * MCP(Model Context Protocol) JSON-RPC 디스패치 — 전송 계층과 분리된 순수 함수. * * `@modelcontextprotocol/sdk`를 쓰지 않는 이유: 우리가 필요한 것은 툴 전용 서버의 * 5개 메서드뿐이고, SDK는 4MB가 넘는다. `crosspane`은 npx로 받는 CLI라 설치 크기가 * 그대로 첫 실행 체감이 된다 (근거는 docs/decisions.md). */ /** 우리가 응답하는 기본 프로토콜 버전 */ export declare const MCP_PROTOCOL_VERSION = "2025-06-18"; export interface JsonRpcResponse { jsonrpc: '2.0'; id: string | number | null; result?: unknown; error?: { code: number; message: string; }; } export declare const JSON_RPC_PARSE_ERROR = -32700; export declare function errorResponse(id: string | number | null, code: number, message: string): JsonRpcResponse; /** * 메시지 하나를 처리한다. 알림(id 없음)은 응답이 없으므로 null을 돌려준다 — * 알림에 응답을 보내면 스펙 위반이고 일부 클라이언트가 연결을 끊는다. */ export declare function handleRpcMessage(message: unknown, ctx: ToolContext): Promise;