News Headlines
Use the bundled script to fetch headlines from NewsAPI.
Available Sources
| Source | Flag | Description |
|---|---|---|
| US Business | --source us-business | Top US business headlines |
| TechCrunch | --source techcrunch | Latest TechCrunch articles |
| Wall Street Journal | --source wsj | Recent WSJ stories |
Sandbox Constraints
This script runs inside a sandboxed environment with strict rules:
- Only
.venv/bin/pythonis allowed. Do not use barepython,python3, or any other interpreter. - No shell operators. Do not use
&&,||,;,|,>,<,$(...), or backticks. - No
cd. Always use the relative path from the project root. - The API key is injected by the sandbox proxy. Do not pass an API key.
- The exact command prefix must be:
.venv/bin/python plugins/news-plugin/skills/news-headlines/scripts/get_news.py
Any command that does not match this format will be rejected.
Run Workflow
-
Determine the source. Based on the user's request, pick the appropriate
--sourceflag.- General US/business news:
us-business - Tech news or TechCrunch:
techcrunch - Wall Street Journal or financial news:
wsj
- General US/business news:
-
Run the script with the chosen source.
-
Summarize the result for the user.
- List the top headlines with brief descriptions.
- Mention the source and publish time.
- If the user asked broadly for "news", run multiple sources.
Command Format
The only allowed Bash command format:
.venv/bin/python plugins/news-plugin/skills/news-headlines/scripts/get_news.py --source <SOURCE>
Optional flags:
.venv/bin/python plugins/news-plugin/skills/news-headlines/scripts/get_news.py \
--source techcrunch \
--page-size 5
Output Expectations
- Article number, title, source name, author, publish date, description, and URL.
- Default returns 10 articles per source.
