pub fn extract_json_from_response(content: &str) -> StringExpand description
Extract JSON content from a response, handling markdown code fences.
CLI runners often wrap JSON in markdown fences (e.g. ```json ... ```).
This function strips those fences and returns the raw JSON object using a
brace-depth counter to find the outermost {...} block.