import type { DashboardApi } from "./api.js"; export declare const DASHBOARD_HOST = "127.0.0.1"; export declare const DASHBOARD_IDLE_MS: number; export declare const MAX_BODY_BYTES: number; export declare const CONTENT_SECURITY_POLICY: string; export declare const DEFAULT_STATIC_DIR: string; export interface DashboardServerOptions { api: DashboardApi; staticDir?: string; idleMs?: number; onClose?: () => void; } export interface DashboardServer { readonly port: number; readonly origin: string; /** Current session token. Rotating invalidates the previous one. */ token(): string; rotateToken(): string; close(): Promise; } /** * Loopback-only dashboard server. * - Binds 127.0.0.1 on an ephemeral port. * - Host must be 127.0.0.1: or localhost: (DNS rebinding). * - /api/* needs `Authorization: Bearer `; POST also needs a matching Origin (CSRF). * - Static files carry no data and are served from a fixed allowlist. * - Shuts itself down after `idleMs` without requests. */ export declare function startDashboardServer(options: DashboardServerOptions): Promise; //# sourceMappingURL=server.d.ts.map