v2.5.0 - Pluggable News Headlines
New Features
-
Pluggable news headlines provider: Top headlines are now injected into LLM context so personalities can naturally reference current events ("Did you hear about…", "Speaking of the news…"). New
NewsProviderinterface mirroring the v2.4.0 weather provider pattern with three adapters:- RSS (default) — any RSS or Atom feed via
feedparser. NPR Topics: News is the built-in fallback ifNEWS_RSS_URLis unset, so headlines work out-of-the-box with zero configuration. - Hacker News — free public API, parallel fan-out across items.
- Manual — newline-separated env var for offline / testing (zero network egress).
Cached 30 min, top 5 headlines per turn. Disable entirely with
NEWS_PROVIDER=none. - RSS (default) — any RSS or Atom feed via
Improvements
- Robust RSS handling: HTML markup stripped from titles (e.g.,
<b>BREAKING:</b> Foo— would otherwise be read aloud by TTS). Polite identifyingUser-Agenton every HTTP request, since BBC / NYT / Reuters / Cloudflare-fronted feeds frequently 403 the defaultpython-requests/X.YUA. URL scheme validated (http/https only);allow_redirects=Falseso a misconfigured feed doesn't silently chain through arbitrary hosts.RequestExceptioncleanly returnsNoneper the ABC contract for uniform negative-caching. - Hacker News parallel fetch: top-stories + N item fetches use a shared
requests.Sessionwith aThreadPoolExecutorso cold-miss latency stays bounded even with highNEWS_HEADLINE_LIMIT. Per-item timeout tightened to 2s. Per-itemraise_for_status()added (HN's Firebase API can return Cloudflare HTML on 200 during incidents). - Better startup observability: news provider init log includes the resolved URL/feed name and a
Set NEWS_PROVIDER=none in .env to disablehint, so users can grep one line to see exactly where headlines are coming from. Pre-warm-failure message clarifies that headlines are skipped but the toy itself still works. - Documentation refresh: project structure tree in
README.mdbrought current with the actual filesystem (utils modules, scheduler, supervisor scripts, all tests subdirectories, top-level files likeROADMAP.mdandCLAUDE.md). README.env Settingsnow covers Weather Context, News Headlines, Proactive Scheduler, and Supervisor / Watchdog — four whole categories that were previously undocumented. Architecture > Key Components lists the real-world context provider, proactive scheduler, and process supervisor.tests/README.mdtree refreshed.docs/CREATING_PERSONALITIES.mdnow mentionsscheduled_events.yamland RVC models in the personality directory layout.docs/QUICKSTART.mdgains a §5b for news with feed table, privacy callout, and child-safety guidance.
Configuration
New env vars (all optional; news is on by default with NPR):
#NEWS_PROVIDER=rss # or hackernews / manual / none / auto
#NEWS_RSS_URL=https://feeds.npr.org/1001/rss.xml # NPR by default
#MANUAL_NEWS=Headline one\nHeadline two
#NEWS_HEADLINE_LIMIT=5
#NEWS_CACHE_TTL_MINUTES=30To disable entirely: NEWS_PROVIDER=none.
Upgrading and don't want news? Add NEWS_PROVIDER=none to your existing .env. Existing installs will start fetching NPR headlines at next restart until that line is added.
Privacy note: the news server (e.g., NPR) sees your IP and access cadence; OpenAI sees the headline text and can infer which feed you chose. Use NEWS_PROVIDER=manual or NEWS_PROVIDER=none for zero third-party news egress.
For child-facing personalities (e.g., teddy_ruxpin, fred): NPR Top News may include violence, politics, or other content unsuitable for children. Consider NEWS_PROVIDER=none or a kid-safe RSS feed when running with these personalities.
New dependency
feedparser>=6.0.10(post-6.0 XXE/billion-laughs hardening enabled by default)