/** * HTTP Server Mode for Decibel MCP * * Exposes the MCP server over HTTP for remote access (e.g., ChatGPT, external agents). * * Usage: * node dist/server.js --http --port 8787 * node dist/server.js --http --port 8787 --auth-token YOUR_SECRET * * Endpoints: * GET /health - Health check * GET /tools - List available tools * POST /call - Execute any tool: { tool: string, arguments: object } * POST /dojo/wish - Shorthand for dojo_add_wish * POST /dojo/propose - Shorthand for dojo_create_proposal * POST /dojo/scaffold - Shorthand for dojo_scaffold_experiment * POST /dojo/run - Shorthand for dojo_run_experiment * POST /dojo/results - Shorthand for dojo_get_results * POST /dojo/artifact - Shorthand for dojo_read_artifact * GET /dojo/list - Shorthand for dojo_list * POST /mcp - Full MCP protocol endpoint * * All responses use status envelope: * { "status": "executed", ...data } * { "status": "error", "error": "...", "code": "..." } */ import { Server } from '@modelcontextprotocol/sdk/server/index.js'; import type { ToolKernel } from './kernel.js'; import type { AgentRegistry } from './daemon.js'; import type { DaemonConfig } from './daemonConfig.js'; export declare const TERMINALS_HINT: string; /** Called once when the HTTP server starts. Never throws. */ export declare function checkTerminals(): Promise; export interface HttpServerOptions { port: number; authToken?: string; host?: string; sseKeepaliveMs?: number; timeoutMs?: number; retryIntervalMs?: number; rateLimitRpm?: number; isDaemon?: boolean; configLicenseKey?: string; agentRegistry?: AgentRegistry; daemonConfig?: DaemonConfig; } /** * Handle returned by startHttpServer for lifecycle management. * Used by the HttpAdapter to implement TransportAdapter.stop(). */ export interface HttpServerHandle { stop(): Promise; } /** * Start an HTTP server that handles MCP requests * * Note: This creates a single stateless transport. Each request is handled * independently. For full session support, this would need to be expanded. */ export declare function startHttpServer(server: Server, kernelInstance: ToolKernel, options: HttpServerOptions): Promise; export { parseHttpArgs, type HttpArgs } from './httpArgs.js'; //# sourceMappingURL=httpServer.d.ts.map