pub fn save_session(session: &Session) -> Result<(), PawError>Expand description
Atomically writes a session to disk.
Serializes the session to JSON, writes to a temporary file in the same directory, then renames to the final path. This prevents corruption if the process is killed mid-write.