import type { Theme } from "@earendil-works/pi-coding-agent"; import type { Component, Focusable } from "@earendil-works/pi-tui"; import { type BrowseState, type ListRow } from "./state/index.js"; export interface BrowseTuiComponentOptions { /** Archived runs (caller does the archive I/O — collectListRows()). */ rows: ListRow[]; /** Known project keys (caller reads projects.json). */ knownProjects: string[]; theme: Theme; /** A run was chosen — the caller opens the replay dashboard. */ onSelect: (runId: string) => void; /** The browser was closed without a selection. */ onExit: () => void; /** Invalidate hook supplied by the TUI driver (forces re-render). */ requestRender?: () => void; /** Test seam for the since-filter cutoff; defaults to Date.now(). */ now?: number; } export declare class BrowseTuiComponent implements Component, Focusable { private state; private readonly opts; private readonly screen; private exited; /** Focusable — pi sets this to true when the overlay has keyboard focus. * Without this, arrow keys don't route to handleInput (config-tui 07e886f). */ focused: boolean; constructor(opts: BrowseTuiComponentOptions); invalidate(): void; render(width: number): string[]; handleInput(data: string): void; /** Test/inspection seam. */ getState(): BrowseState; private handleResult; private dispatch; private maybeFinish; }