Drain and return all buffered alerts, oldest first (the port of session::pop_alerts). The queue is emptied; a fresh batch accumulates for the next call.
session::pop_alerts