A streaming newline framer. stdio reads arrive in arbitrary chunks; this buffers partial lines and emits one complete line at a time (NFR-3).
Any buffered, unterminated remainder (flushed on stream end).
Feed a chunk; returns any complete lines (without trailing newline).
A streaming newline framer. stdio reads arrive in arbitrary chunks; this buffers partial lines and emits one complete line at a time (NFR-3).