Add CSV parsing and generation builtins.
Motivation
Tabular data is one of the most common data formats agents process. CSV parsing with proper quoting, escaping, and header handling is needed for data analysis, report generation, and ETL tasks.
Proposed functions
csv_parse(@String -> Array<Array<@String>>) — parse CSV string into rows of fields
csv_parse_with_headers(@String -> Array<Map<@String, @String>>) — parse with header row
csv_format(Array<Array<@String>> -> @String) — generate CSV from rows
Implementation notes
RFC 4180 compliant. Handles quoted fields, embedded commas, embedded newlines. Pure functions.
Dependencies
Add CSV parsing and generation builtins.
Motivation
Tabular data is one of the most common data formats agents process. CSV parsing with proper quoting, escaping, and header handling is needed for data analysis, report generation, and ETL tasks.
Proposed functions
csv_parse(@String -> Array<Array<@String>>)— parse CSV string into rows of fieldscsv_parse_with_headers(@String -> Array<Map<@String, @String>>)— parse with header rowcsv_format(Array<Array<@String>> -> @String)— generate CSV from rowsImplementation notes
RFC 4180 compliant. Handles quoted fields, embedded commas, embedded newlines. Pure functions.
Dependencies
csv_parse_with_headersneeds Map type