Drops news's own sources (Bluesky, Mastodon, X, podcast) and the tools only they use (video, posts, walls), with the PodcastSource and segment_profile exports. scrape, article, checks, browser and framing stay: base.py imports scrape's Getter at module level and scrape imports the other four, so dropping them would mean editing the plugin contract. desk/README.md records the source of truth, the prune and how to refresh. All 371 tests pass. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
27 lines
1.4 KiB
Python
27 lines
1.4 KiB
Python
"""Reusable machinery with no opinion about news.
|
|
|
|
A tool is something a pipeline stage picks up and puts down: it takes plain
|
|
inputs, returns plain outputs, and knows nothing about subscriptions, feeds,
|
|
or what a job is for. That is the test for whether a module belongs here —
|
|
if it would make sense in a different application, it is a tool.
|
|
|
|
agent.py who answers when something needs a model: the Claude API
|
|
with a key, the `claude` CLI on a subscription, or nobody
|
|
credentials.py the token `agent` reads from the app's database
|
|
embedding.py text in, vector out
|
|
http.py one shared HTTP client per call chain
|
|
failures.py what went wrong, in one word a retry policy can use
|
|
marks.py what kind of thing is this, if not an article?
|
|
scrape.py an article out of a URL: fetch, check, convert.
|
|
Kept because `desk.sources.base` imports its `Getter`;
|
|
`article.py`, `checks.py`, `browser.py` and `framing.py`
|
|
stay only because `scrape.py` imports them
|
|
|
|
roledesk's copy prunes news's `video/`, `posts.py` and `walls.py`, which only
|
|
news's own sources use (see `desk/README.md`).
|
|
|
|
Nothing is imported here on purpose. `embedding` pulls in a
|
|
sentence-transformer, `agent` an SDK; each is paid for by the caller that
|
|
wants it and by nobody else.
|
|
"""
|