Skip to content

AI agent skill that researches any topic across Reddit, X, YouTube, HN, Polymarket, and the web - then synthesizes a grounded summary

fix(bird_x): normalize list responses from Bird search to dict format

Trevin Chow65399eb4eb76
diff --git a/scripts/lib/bird_x.py b/scripts/lib/bird_x.py
index 63a6c442..66f31015 100644
--- a/scripts/lib/bird_x.py
+++ b/scripts/lib/bird_x.py
@@ -213,7 +213,10 @@ def _run_bird_search(query: str, count: int, timeout: int) -> Dict[str, Any]:
if not output:
return {"items": []}
- return json.loads(output)
+ parsed = json.loads(output)
+ if isinstance(parsed, list):
+ return {"items": parsed}
+ return parsed
except json.JSONDecodeError as e:
return {"error": f"Invalid JSON response: {e}", "items": []}