import { type Parsed } from "../util.js"; export { pageHtml } from "../ui/page.js"; /** * How long a request may go quiet before bun closes the connection under it. * * This is the HTTP inactivity timeout, not the socket's: the socket's own lives * on the `websocket` handler object and defaults to two minutes, which bun's * automatic pings keep resetting. Setting a value at this level does nothing * for the page's socket at all. * * It is bun's maximum because one handler here waits on a person rather than on * a computer: `POST /api/pick` opens a native folder picker and does not answer * until somebody has chosen a directory. bun's default of ten seconds closes * the connection under exactly that. Measured on bun 1.3.14: a handler that * takes fourteen seconds is cut off at ten and the caller's fetch rejects with * "the socket connection was closed unexpectedly". node's server, which this * replaced, imposed no such limit, so leaving this unset is a regression rather * than a default. * * Exported so the floor can be asserted: what matters is not the exact number * but that it is far longer than a person takes to pick a folder. */ export declare const HTTP_IDLE_SECONDS = 255; /** * The project this server serves, and its config, written when there is none. * * `lookout ui` is a verb like any other: it looks at the directory it was * started in. That is where it STARTS, not where it is bound for life; the * settings panel can point it at another project and `ui()` reads that answer * back from here on the next launch. What sent this file's settings to the * operator's home once was a pointer that had nowhere else to live, and the * launch directory is that somewhere else. * * A project with no config gets one, rather than the refusal `ensureProjectConfig` * gives a verb that is about to go and look at something: this is the screen a * person configures a project ON, so stopping here to ask them to edit a file * and re-run is the wrong shape. A directory that is no project at all is * refused instead of littered. */ export declare function projectToServe(parsed: Parsed): Promise; export declare function ui(parsed: Parsed): Promise;