import type { AdmittedChatSession, CloseReport } from "./session.js"; import type { Recipient } from "./view.js"; export type FrontEnd = "tui" | "plain" | "stdio"; /** * Choose the front end. `--stdio` is explicit and never combines with the TUI or `--json`. The TUI * needs both stdin and stdout to be terminals and input not disabled; otherwise a human session * refuses rather than silently falling back (the caller reports `--plain` or `--stdio` as remedies). */ export declare function selectFrontEnd(values: { stdio?: boolean; plain?: boolean; json?: boolean; }): { ok: true; frontEnd: FrontEnd; } | { ok: false; message: string; }; /** * A loaded front end. Starting it runs one admitted session and returns its close report, with * diagnostics on stderr. It installs its signal handling before its first await, so a caller that * holds the signals until then hands them over with no gap. The caller maps the report to an exit * code; a missing or non-`retired` report is never presented as a confirmed retirement. */ export type StartChatFrontEnd = (opts: { session: AdmittedChatSession; /** The channel the command named. The TUI and `--plain` start addressed to it. */ initialRecipient?: Recipient; /** What the command disclosed about that channel before admission, shown again in the TUI. */ notice?: string; }) => Promise; /** Load the chosen front end's modules. Nothing runs until the returned function is called. */ export declare function loadChatFrontEnd(frontEnd: FrontEnd): Promise; //# sourceMappingURL=frontend.d.ts.map