Architecture

Daemon-owned PTYs with native mobile views.

The host daemon owns every session. Desktop CLI and Android are views into the same PTY: desktop uses local IPC, while paired mobile clients use authenticated iroh streams.

PTY model

Shelly streams raw PTY bytes. The daemon keeps a 256 KB byte ring with monotonic sequence numbers and a wezterm-term terminal model for synthetic ANSI snapshots.

Transport

Local desktop clients use length-prefixed bincode over a hardened Unix socket. Paired mobile clients use length-prefixed MessagePack over iroh QUIC, and iroh rejects desktop CLI client kinds during handshake.

Persistence

Session summaries, scrollback, paired devices, and push tokens are stored in encrypted local redb databases with keys held by the OS keychain unless the user explicitly opts out. Persistence parents are private 0700, database files are 0600, and symlinked stores are rejected.

Relay

The relay handles iroh fallback and privacy-preserving push. FCM service-account JSON and Honeycomb credentials live only on the relay; APNs is deferred with iOS.