How boo architecture works
mainboo uses a client-daemon model to manage terminal sessions:
- Client: Puts your TTY in raw mode and communicates with the daemon via a framed Unix-socket protocol.
- Daemon: A persistent process that owns the session. It manages a PTY-attached child process.
- Terminal State: The daemon uses
libghostty-vtto parse all output from the PTY. This allows the daemon to maintain a perfect record of the screen state (contents, styles, cursor, scrollback, and modes). - Rehydration: When a client attaches, the daemon uses a
TerminalFormatterto replay the screen from the savedlibghosttystate, ensuring a faithful redraw. - Detached Queries: While a session is detached, the daemon can answer terminal queries (like DSR or DA) using the stored state, preventing TUIs from hanging.