Parse a batched, row-wrapped tag response into per-row field lists
Source:R/batch_mode.R
llm_parse_rowpack_tags.RdSplits a single batched reply into its numbered <row_i> blocks and then
applies the standard flat tag parser (llm_parse_tags()) inside each block.
This is the parsing counterpart to the <row_i> protocol that LLMR uses when
.rows_per_prompt > 1 together with .tags; it is exported so the protocol is
inspectable and testable on its own.
Value
A list of length m. Element i is the named list returned by
llm_parse_tags() for <row_i>, or NULL when that block is absent,
truncated, or otherwise unrecoverable.
Details
Robustness mirrors the internal scanner: reordered, duplicated, hallucinated,
truncated, or accidentally nested <row_i> blocks are handled; only fully
closed blocks contribute. Inner field tags are extracted by the same parser
used in non-batched tag mode, so values coerce and decode identically.