/** * Pre-constructed tools for parsing CSV, TSV, JSON, YAML, and other structured text formats. * * @module @nhtio/adk/batteries/tools/parsing * * @remarks * Pre-constructed bundled tools for the `parsing` category. Import individually, the whole * category, or import every tool via `@nhtio/adk/batteries`. */ import { Tool, SpooledJsonArtifact } from "../../../common"; /** * Parse a CSV or TSV string into a JSON array. * * @remarks * With `has_header: true` (default), each row becomes an object keyed by column name. Without a * header, rows are returned as positional arrays. `delimiter` auto-detects when omitted; pass * `"\t"` for TSV. Rows are clipped to `limit` (default 1000, max 10000). Parse warnings are * prepended to the output. */ export declare const parseCsvTool: Tool>; /** * Parse a YAML string into JSON. * * @remarks * Returns a pretty-printed JSON representation of the parsed YAML document. Invalid YAML * returns an error string. */ export declare const parseYamlTool: Tool>; /** * Extract key-value pairs from text. * * @remarks * Handles `.env` files, config files, and query strings. `kv_delimiter` chooses the * key→value separator (`=`, `:`, or `auto`); `pair_delimiter` selects how pairs are separated * (`newline`, `comma`, `semicolon`, `ampersand`). Surrounding single or double quotes around * values are stripped. Comment lines starting with `#` are skipped by default. */ export declare const parseKvTool: Tool>; /** * Detect the most likely field delimiter in a CSV-like text sample. * * @remarks * Tries comma, tab, semicolon, pipe, and colon. Scores each by mean field count divided by * variance (so consistent row widths beat noisy splits). Looks at up to the first 20 lines of * the first 5000 characters. */ export declare const detectDelimiterTool: Tool;