External event ingress for the Textual CLI app.
Exposes a small EventSource protocol plus a Unix-domain-socket implementation
that lets local processes push commands, prompts, and signals into a running
CLI session over a newline-delimited JSON wire protocol.
The wire format and configuration env vars may change without semver guarantees while this surface stabilizes.
Top-level event kinds carried by the wire protocol.
Closed vocabulary of kind="signal" payloads accepted by the listener.
Type alias for the async callback that receives parsed events.
Return the default per-process Unix socket path.
Prefers XDG_RUNTIME_DIR (per-user, tmpfs-backed, auto-cleaned on
logout) and falls back to the system temp dir when the runtime
directory is unset.
Decode one newline-delimited JSON external event.
Classification that controls whether a command can skip the message queue.
A transport-independent event delivered from outside the TUI.
Source of external events for the CLI app.
Implementations must be safe to stop() even when start() failed
partway through; the app always invokes stop() from a finally block.
Line-delimited JSON event source over a local Unix domain socket.
The listener creates its parent directory with mode 0o700 and binds the
socket inside it under a transient umask(0o077) so the socket inherits
0o600 from the moment of bind(). Stale sockets at the configured path
are removed on start, but only after a stat confirms the path is a
socket — a regular file or directory at that path is left untouched and
causes start to fail loudly.