import type { Parser } from './types'; /** * Simple XML node representation */ export interface XMLNode { tag: string; attributes: Record; children: (XMLNode | string)[]; text: string; } /** * Parse JSON from LLM response content * Handles common LLM quirks like markdown code blocks */ declare function parseJSON(content: string): T; /** * Parse XML from LLM response content into a simple DOM-like structure */ declare function parseXML(content: string): XMLNode; /** * Extract code from markdown code blocks * @param content - The content containing code blocks * @param language - Optional language to filter by */ declare function parseCodeBlock(content: string, language?: string): string; /** * Create a custom parser wrapper */ declare function createCustomParser(fn: (content: string) => T): Parser; /** * Built-in parsers for LLM responses */ export declare const parsers: { /** * Parse JSON from response content */ json: typeof parseJSON; /** * Parse XML from response content */ xml: typeof parseXML; /** * Extract code from markdown code blocks */ codeBlock: typeof parseCodeBlock; /** * Create a custom parser */ custom: typeof createCustomParser; }; export type { Parser }; //# sourceMappingURL=parsers.d.ts.map