/** * Local dashboard server. Node stdlib only, loopback only. * * The bind address is not configurable to a public interface on purpose: this * process serves your source code, your branch names and your shell history back * as JSON. */ import { type Server } from "node:http"; import type { Store } from "./store.js"; /** * Resolve a `/static/` request to a real file path, or `null` if it escapes. * * Separate from the response so the traversal guard can be tested directly * rather than inferred from a 404 — a 404 is also what a missing file returns, * so asserting on the status code alone cannot tell a working guard from a * lucky `statSync` failure. */ export declare function resolveStatic(name: string): string | null; /** * Build the HTTP server without binding it. * * Split out from `serve` so tests can listen on port 0 and close cleanly. A * handler that throws must not take the process down with it — the catch is the * only thing standing between one malformed stored run and a dead dashboard. */ export declare function createApp(store: Store): Server; export declare function serve(store: Store, { host, port }?: { host?: string; port?: number; }): Server;