TerminalViewportResizeResult
data class TerminalViewportResizeResult(val scrollbackOffset: Int, val historySize: Int, val discardedCount: Long)
Viewport anchor and history baseline captured atomically after terminal resize.
Reflow can replace the history storage and its discarded-row counter. Apply all three values together before interpreting later history changes as output.