Skip to main content

rss_cli/
lib.rs

1//! `rss-cli` — an AI-friendly RSS/Atom feed CLI library.
2//!
3//! The crate is split into small modules with **frozen public interfaces** so that
4//! independent implementation work can proceed in parallel without colliding:
5//!
6//! - [`model`]   — serialized output types (the AI-facing API contract).
7//! - [`config`]  — runtime parameters that are *not* serialized (params, policies).
8//! - [`error`]   — error type, stable error codes, and process exit codes.
9//! - [`cache`]   — atomic file-based HTTP cache (conditional GET + `show`/`get_item`).
10//! - [`fetch`]   — HTTP client with conditional GET.
11//! - [`ratelimit`]— per-host request gate shared across concurrent fetches (ADR-0016).
12//! - [`parse`]   — `feed-rs` → [`model`] conversion, date/URL normalization.
13//! - [`identity`]— deterministic, cache-independent stable item IDs (the keystone).
14//! - [`content`] — HTML → markdown/text extraction + token estimation.
15//! - [`discover`]— feed autodiscovery from a website URL.
16//! - [`output`]  — json/ndjson/text rendering + JSON Schema emission.
17//! - [`core`]    — orchestration that the CLI and the MCP server both call.
18//! - [`mcp`]     — Model Context Protocol server (stdio transport).
19
20pub mod cache;
21pub mod cli;
22pub mod config;
23pub mod content;
24pub mod core;
25pub mod discover;
26pub mod error;
27pub mod fetch;
28pub mod identity;
29pub mod mcp;
30pub mod model;
31pub mod output;
32pub mod parse;
33pub mod ratelimit;
34
35pub use error::{RssError, exit};
36pub use model::{
37    DiscoverOutput, DiscoveredFeed, Enclosure, ErrorObj, FeedResult, FeedStatus, FetchOutput,
38    IdSource, Item, SCHEMA_VERSION,
39};