/**
 * API Server
 *
 * Main entry point for the Code Buddy REST API and WebSocket server.
 *
 * Usage:
 *   npm run server
 *   # or
 *   codebuddy server --port 3000
 */
import { Application } from 'express';
import { Server as HttpServer } from 'http';
import type { ServerConfig } from './types.js';
import { getConnectionStats } from './websocket/index.js';
declare const DEFAULT_CONFIG: ServerConfig;
/**
 * Start the server
 */
export declare function startServer(userConfig?: Partial<ServerConfig>): Promise<{
    app: Application;
    server: HttpServer;
    config: ServerConfig;
}>;
/**
 * Stop the server gracefully
 */
export declare function stopServer(server: HttpServer): Promise<void>;
/**
 * Get server stats
 */
export declare function getServerStats(server: HttpServer): {
    connections: ReturnType<typeof getConnectionStats>;
    listening: boolean;
};
export { DEFAULT_CONFIG };
export type { ServerConfig };
