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//! - [`parse`] — `feed-rs` → [`model`] conversion, date/URL normalization.
12//! - [`identity`]— deterministic, cache-independent stable item IDs (the keystone).
13//! - [`content`] — HTML → markdown/text extraction + token estimation.
14//! - [`discover`]— feed autodiscovery from a website URL.
15//! - [`output`] — json/ndjson/text rendering + JSON Schema emission.
16//! - [`core`] — orchestration that the CLI and the MCP server both call.
17//! - [`mcp`] — Model Context Protocol server (stdio transport).
18
19pub mod cache;
20pub mod cli;
21pub mod config;
22pub mod content;
23pub mod core;
24pub mod discover;
25pub mod error;
26pub mod fetch;
27pub mod identity;
28pub mod mcp;
29pub mod model;
30pub mod output;
31pub mod parse;
32
33pub use error::{RssError, exit};
34pub use model::{
35 DiscoverOutput, DiscoveredFeed, Enclosure, ErrorObj, FeedResult, FeedStatus, FetchOutput,
36 IdSource, Item, SCHEMA_VERSION,
37};