News

Bundled News module with tiled feed UI, RSS ingestion, Presseclipping metadata, module API writes, and news agent tools.

What it does

news is a bundled React module that collects curated or externally aggregated news items into one tiled feed. Items arrive by manual entry, automatic RSS ingestion, or programmatic writes from automations and agents. Each item can carry Presseclipping metadata (athlete/project/partner context, ranking, review status, reach), so the feed doubles as a media-monitoring review queue.

The module is also available as a native Apple screen in clients/apple/ClapilotApple (Sources/Clapilot/Views/NewsView.swift), with a compact list and a dedicated detail view for iPhone and macOS.

How to open it

  • Web: /modules/news (bundled module, slug news).
  • Manifest: bundled-modules/news/module.json; React renderer: src/components/modules/news-module.tsx.
  • Settings: /settings/news (panel: src/components/news-settings-panel.tsx).

Key workflows

Read the feed

  1. Open /modules/news. Items render as tiles of uniform size regardless of poster image dimensions.
  2. Click a tile to open its detail dialog, where long summaries and full text remain readable.
  3. Follow the optional external source link on tiles that have one.

Ingest news via RSS

  1. Open /settings/news and add RSS source URLs; each source can be enabled or disabled individually.
  2. Enable RSS auto-ingest and set the stale-sync interval (minutes) and the max imported entries per feed.
  3. Feeds sync on demand (POST /rss-sync) and automatically when a module read finds the data stale.

Review Presseclippings

  1. Items store clipping metadata: athlete/project/partner context, a 1-3 ranking, review status (pending, approved, rejected), relevance, source reach/type, and report preview or screenshot links.
  2. Update review fields per item (UI or PATCH /items/:id) to prepare clipping reports.

Write items programmatically

Automations, live tools, and native runtime tools can create or upsert items through POST /api/modules/news/api/items:

FieldNotes
titlerequired
summary, content_textoptional body fields
source_label, source_url, poster_image_url, published_atoptional presentation fields
external_idoptional; enables idempotent upserts
clipping fieldstop-level or under clipping: athlete_name, project_name, partner_name, rating (1-3), relevance, source_reach, article_type, review_status (pending/approved/rejected), report_preview_url, screenshot_url, import_source

How the agent can drive it

The native runtime exposes first-class News tools (defined in services/clapilot-agent/src/tool-definitions.mjs, tool-catalog family "News"):

  • news_list_items — list entries with optional limit (1-100), search, source_kind (manual/api/rss), athlete_name, review_status (pending/approved/rejected), and refresh to trigger an RSS sync before reading.
  • news_create_item — create or upsert one entry; accepts title (required) plus the same summary/source/poster/external_id and clipping fields as the module API write payload above.

For flows the tools do not cover (settings, RSS source management, item updates), agents and automations use the module API directly.

Module API reference

Base: /api/modules/news/api

RoutePurpose
GET /healthhealth check
GET /itemslist items; supports limit, search, source_kind, athlete_name, review_status, and optional refresh=true
POST /itemscreate or upsert one news item
PATCH /items/:idupdate an item and its Presseclipping metadata for manual review/report preparation
GET /settings, POST /settingsread/write module settings
GET /rss-sources, POST /rss-sourceslist/create RSS sources
PUT /rss-sources/:id, DELETE /rss-sources/:idupdate/remove an RSS source
POST /rss-synctrigger an RSS sync run

Configuration & limits

Settings persisted via /settings/news:

  • whether RSS auto-ingest is enabled
  • stale-sync interval in minutes
  • max imported entries per feed
  • list of RSS source URLs with per-source enabled/disabled state

Data model (migrations db/migrations/074_news_module.sql and bundled-modules/news/migrations/001_create_news_schema.sql):

  • news_module_settings
  • news_rss_sources
  • news_items

Troubleshooting

  • Feed looks stale: trigger POST /api/modules/news/api/rss-sync or call GET /items?refresh=true; check that the RSS source is enabled in /settings/news.
  • Duplicate items from automations: pass a stable external_id on POST /items so writes upsert instead of inserting.