/** * HTTP API Server * * REST API for browser-based clients to query the local .gitnexus/ index. * Also hosts the MCP server over StreamableHTTP for remote AI tool access. * * Security: binds to 127.0.0.1 by default (use --host to override). * CORS is restricted to localhost, private/LAN networks, and the deployed site. */ /** * Determine whether an HTTP Origin header value is allowed by CORS policy. * * Permitted origins: * - No origin (non-browser requests such as curl or server-to-server calls) * - http://localhost: — local development * - http://127.0.0.1: — loopback alias * - RFC 1918 private/LAN networks (any port): * 10.0.0.0/8 → 10.x.x.x * 172.16.0.0/12 → 172.16.x.x – 172.31.x.x * 192.168.0.0/16 → 192.168.x.x * - https://gitnexus.vercel.app — the deployed GitNexus web UI * * @param origin - The value of the HTTP `Origin` request header, or `undefined` * when the header is absent (non-browser request). * @returns `true` if the origin is allowed, `false` otherwise. */ export declare const isAllowedOrigin: (origin: string | undefined) => boolean; export declare const createServer: (port: number, host?: string) => Promise;