/**
 * JSON-RPC Server for code-buddy
 *
 * Standalone server that communicates via stdin/stdout.
 * Can be used by any JSON-RPC client (FileCommander, VS Code, etc.)
 */
export interface JsonRpcServerOptions {
    /** Enable verbose logging */
    verbose?: boolean;
    /** Custom API key (overrides env) */
    apiKey?: string;
    /** Working directory */
    workdir?: string;
}
export declare class JsonRpcServer {
    private rl;
    private initialized;
    private clientName;
    private clientVersion;
    private conversationHistory;
    private contextFiles;
    private options;
    constructor(options?: JsonRpcServerOptions);
    /**
     * Start the server and listen for requests on stdin
     */
    start(): Promise<void>;
    /**
     * Stop the server
     */
    stop(): void;
    /**
     * Handle incoming message
     */
    private handleMessage;
    /**
     * Validate required string field in params
     */
    private requireString;
    /**
     * Cast validated params to a specific type.
     * Only call after requireString/field validation confirms required fields.
     */
    private checkedParams;
    /**
     * Dispatch request to appropriate handler
     */
    private dispatch;
    private handleInitialize;
    private handleShutdown;
    private handleAiComplete;
    private handleAiChat;
    private handleAiClearHistory;
    private handleToolsList;
    private handleToolsCall;
    private handleFcsExecute;
    private handleFcsParse;
    private handleContextAdd;
    private handleContextList;
    private handleContextClear;
    private handleGitStatus;
    private handleGitDiff;
    private send;
    private sendError;
    private sendNotification;
    private log;
}
export declare function createJsonRpcServer(options?: JsonRpcServerOptions): JsonRpcServer;
