Shared helpers for newline-delimited subprocess output buffering and JSON decoding.
@type line() :: binary()
@spec decode_complete_lines([binary()]) :: {[map()], [binary()]}
@spec decode_json_lines(binary(), iodata()) :: {[map()], binary(), [binary()]}
@spec decode_line(binary()) :: {:ok, map()} | {:non_json, binary()}
@spec iodata_to_binary(iodata()) :: binary()
@spec split_lines(binary()) :: {[line()], binary()}