1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
//! # archivist-core
//!
//! Platform-neutral core for the FicHub companion bot.
//!
//! This crate contains ALL business logic shared by every platform adapter:
//!
//! - `api` — typed FicHub REST API client (`FichubClient`)
//! - `model` — response/request structs
//! - `cache` — Redis pagination + response cache shared with FicHub
//! - `store` — token store (`/link` flow) + pending-link codes
//! - `config` — environment-driven `BotConfig`
//! - `error` — `BotError` (no platform-specific variants)
//! - `util` — URL detection, word formatting, truncation
//! - `core` — the platform-neutral `PlatformMessage` IR + `RichItem` + buttons
//! - `dispatch` — `CoreCtx` + every `do_*` command (search, ask, quote, body,
//! recs, roll, download, bookmark, metadata, help, kudos)
//! - `intent` — free-form natural-language classification (optional LLM via
//! Ollama, heuristic fallback)
//! - `lemmy` — Lemmy/Piefed community monitor (poll-based)
//! - `ratelimit` — cross-platform rate limiting (shared Redis buckets)
//! - `debug` — diagnostics
//!
//! Adapters (fanfic-archivist-discord, -matrix, -telegram, -slack, -irc,
//! -fediverse, CLI, web) depend on this crate and render `PlatformMessage`
//! natively. This crate never imports a platform SDK.
pub use BotConfig;
pub use ;
/// Version of the bot core.
pub const VERSION: &str = env!;