/** * Remove code block wrappers * @param content Content that may contain code block wrappers * @returns Content after removing wrappers */ export declare function removeCodeBlockWrappers(content: string): string; /** * Parse custom headers from a string (typically from environment variables) * Format: Key: Value, separated by newlines * @param headersString String containing headers * @returns Record of headers */ export declare function parseCustomHeaders(headersString: string): Record; /** * Function to remove ANSI color codes * @param text Text containing ANSI color codes * @returns Plain text with color codes removed */ export declare const stripAnsiColors: (text: string) => string; /** * Format a line number prefix in cat -n style (padStart(6) + tab) * @param lineNumber The line number * @returns Formatted line number prefix */ export declare function formatLineNumberPrefix(lineNumber: number): string; /** * Attempt to recover truncated JSON (e.g., missing closing braces due to max tokens). * Tracks brace depth and only recovers if there are unclosed `{` braces. * Will NOT recover if there are unclosed `[` brackets (can't guess the content). * @param jsonStr Potentially truncated JSON string * @returns Recovered JSON string, or the original if unrecoverable */ export declare function recoverTruncatedJson(jsonStr: string): string; /** * Efficiently get the last N lines of a string without splitting the whole string. */ export declare function getLastLines(text: string, count: number): string;