/** * REST API server for cortex-engine. * * Lightweight HTTP layer on top of the same ToolContext used by the MCP server. * Uses Node's built-in http module — zero additional dependencies. * * Routes map directly to cortex tool handlers, so the REST API always stays * in sync with MCP capabilities. Any plugin tools are also exposed. * * Usage: * fozikio serve --rest --port 3000 * cortex-engine --rest --port 3000 */ import type { EngineContext } from '../mcp/server.js'; export interface RestServerOptions { port?: number; /** Interface to bind. Defaults to 127.0.0.1 — pass '0.0.0.0' for LAN exposure. */ host?: string; token?: string; /** When true, start without an auth token. Required to bypass the no-token guard. */ allowUnauthenticated?: boolean; /** When true, reflect any http://localhost:* origin in CORS headers (dashboard dev mode). */ allowCorsLocalhost?: boolean; /** Optional CORS origin override (reserved — not yet wired). */ corsOrigin?: string | RegExp; } /** * Start the REST API server for cortex-engine. * * Reuses the same EngineContext that powers the MCP server, * so tool behavior is identical across both transports. */ export declare function startRestServer(engine: EngineContext, options?: RestServerOptions): Promise; //# sourceMappingURL=server.d.ts.map