Result from running the Textual application.
AppResult(
self,
return_code: int,
thread_id: str | None,
session_stats: SessionStats = SessionStats(),
update_available: tuple[bool, str | None] = (False, None)
)Exit code (0 for success, non-zero for error).
The final thread ID at shutdown. May differ from the initial thread ID if
the user switched threads via /threads.
Cumulative usage stats across all turns in the session.
(is_available, latest_version) for post-exit update warning.