pi-news-api is a Pi extension that fetches news from the Currents News API
and injects a hidden research prompt when the user selects a story.
This package aims to stay:
- explicit about what it does
- free of hard-coded secrets
- conservative about persistence
- honest about API and runtime limitations
Security-relevant behavior:
- calls the Currents News API (
https://api.currentsapi.services) over HTTPS using a key read from theCURRENTS_API_KEYenvironment variable - sends the key only as an
Authorization: Bearer <key>header, never as a URL query parameter - stores enabled-category, language, and bounded interest-aggregate state in
~/.config/pi-news-api/config.json, with legacy Pi custom session entries used only for migration/fallback - stores search topic/count/timestamp and inferred-category aggregates for personalization, but not raw article history, titles, URLs, or API keys
- never uploads raw topic history, counts, timestamps, or interest weights as a profile; explicit search queries and the resulting category filters still go to Currents as required for API requests
- keeps detailed topic history out of agent-tool results; users inspect it
locally through
/news_interests - injects a hidden user-style message when
/news_menuor/news_searchis used to queue a deep-dive research turn - renders a live widget above the editor in Pi
- three documented LLM-callable news tools with no shell or filesystem access
- no shell execution
- no local file writes outside normal npm/package files except
~/.config/pi-news-api/config.jsonfor category/language/interest preferences - never writes
CURRENTS_API_KEYto disk, config files, or logs - no telemetry or analytics
If you discover a security issue, report it privately to the maintainer before opening a public issue. Include:
- package version
- Pi version
- affected command or code path
- reproduction steps (omit your
CURRENTS_API_KEY) - impact assessment
- category/language persistence in
~/.config/pi-news-api/config.json - interest-profile minimization, retention bounds, and clear/disable controls
CURRENTS_API_KEYhandling in the HTTP client (callCurrentsApi) — it must never end up in a URL, log line, or persisted file- hidden prompt injection for deep-dive workflows
- agent-tool result handling for untrusted article titles, summaries, authors, categories, and URLs
- Currents JSON response parsing for malformed or unexpected payloads
- package-install trust signals and published file set
- do not commit tokens, cookies, or API keys
- do not add telemetry or analytics without explicit documentation
- keep the package dependency surface small and review changes before publishing