import type { SessionLifecycleService } from "../lifecycle/service"; import { SessionRouter } from "../router"; type Arguments = Record; type JsonRpcRequest = { jsonrpc: "2.0"; id?: string | number | null; method: string; params?: unknown; }; type JsonRpcResponse = { jsonrpc: "2.0"; id: string | number | null; result?: unknown; error?: { code: number; message: string; }; }; export interface SdkMcpServerOptions { agentDir?: string; router?: SessionRouter; lifecycleService?: SessionLifecycleService; } export declare const SDK_MCP_TOOL_NAMES: readonly ["gjc_session_control", "gjc_session_query", "gjc_session_global", "gjc_session_list"]; /** Creates the model-facing MCP adapter with Router-owned live session authority. */ export declare function createSdkMcpServer(options?: SdkMcpServerOptions): { callTool: (name: string, args?: Arguments) => Promise; handleJsonRpc: (request: JsonRpcRequest) => Promise; handle: (request: JsonRpcRequest) => Promise; start: () => Promise; close: () => Promise; tools: Record[]; }; /** * Runs the SDK MCP server over stdio (newline-delimited JSON-RPC), the shipped * `gjc mcp-serve sdk` entrypoint. SessionRouter owns live endpoint authority and starts lazily * on the first live-session tool, then stops after stdin and in-flight requests drain. */ export declare function runSdkMcpStdio(options?: SdkMcpServerOptions): Promise; export {};