import type { ExportedItem } from "../types.js";
import type { PolicyStore } from "../policyStore.js";
import type { InterruptHandlers } from "./interruptLoop.js";
type JsonRpcId = string | number | null;
export type JsonRpcMessage = {
    jsonrpc?: string;
    id?: JsonRpcId;
    method?: string;
    params?: any;
    result?: any;
    error?: any;
};
/** The transport-agnostic handler returned by createMcpHandler. */
export type McpHandler = (message: JsonRpcMessage) => Promise<JsonRpcMessage | null>;
export type PolicyConfig = {
    policyStore: PolicyStore;
    interruptHandlers: InterruptHandlers;
};
export type McpConfig = {
    serverName: string;
    serverVersion: string;
    exports: ExportedItem[];
    policyConfig?: PolicyConfig;
};
export declare function createMcpHandler(config: McpConfig): McpHandler;
export declare function startStdioServer(handler: McpHandler): void;
export {};
