/** What the settings panel shows: where lookout is pointed, and what answers. */ export interface SettingsView { projectDir: string | null; baseUrl: string | null; configPath: string | null; project: string | null; configured: boolean; /** * Whether this project's calls to action may be clicked on the next run. * * Resolved here rather than handed over raw, because what is stored is the * directory consent was given for: the page should not have to compare two * paths to know whether the consent under the cog is on. */ navigation: boolean; targets: { name: string; url: string; routes: number; up: boolean; status: number | null; }[]; /** * The AIs lookout can judge this project with, and which model each uses. * * `model` is what has been chosen, or null for lookout's own default, which * travels beside it so the page can say what the default IS rather than * printing a name of its own that could drift from the verbs. */ judges: { key: string; label: string; model: string | null; defaultModel: string; installed: boolean; /** * The model names this CLI offers, asked of the install itself. * * Empty when it could not be asked, which is the panel's signal to take a * typed name instead of showing a menu with nothing in it. lookout never * adds a name of its own to this: a menu that outlived the CLI it describes * would be wrong while looking authoritative, which is why the list is a * probe rather than a constant. */ models: string[]; /** The installed CLI's version, so the menu says which install it came from. */ version: string | null; }[]; /** * The device fold, one line per booted device or per gap, in the words * `lookout targets` prints. Empty for a project judged in the web fold only. */ devices: { line: string; up: boolean; }[]; error: string | null; } /** * Ask the operating system for a directory. * * A browser cannot hand back a real filesystem path, so the server asks * instead. lookout is already a local process the user started, so putting a * native picker in front of them is no more privileged than the terminal they * launched it from. */ export declare function pickFolder(): Promise; /** * Point this server at another project, and remember that it was pointed. * * Everything scoped to one project follows the move: that project's config, * its own base URL and consent, its queue, the board cache and the judges' * transcript, which would otherwise go on describing the project just left. * The watcher needs no help; it listens for exactly this. * * The config is found or written the same way `lookout ui` decides it at * startup, because this panel is the same kind of screen a terminal is: the * one a project gets configured ON. A directory that is no project at all is * refused rather than littered. * * Returns the reason it could not, or null when it did. An error rather than a * throw because a folder somebody picked by hand being the wrong folder is an * ordinary answer, not a failed request. */ export declare function switchProject(dir: string): Promise; /** * Re-resolve this server's project with the base URL the panel just saved. * * The whole config is loaded again rather than the origin patched in, because * a target's URL is what preflight probes and what a run is spawned against, * and two spellings of "where the app is" is how a panel comes to report on * one origin while Play checks another. */ export declare function applyBaseUrl(): Promise; export declare function settingsView(): Promise;