Skip to main content

roboticus_api/
lib.rs

1//! # roboticus-api
2//!
3//! HTTP routes, WebSocket push, authentication middleware, rate limiting,
4//! dashboard serving, config runtime, cron runtime, and abuse protection
5//! for the Roboticus agent runtime.
6//!
7//! ## Key Types
8//!
9//! - [`AppState`] -- Shared application state passed to all route handlers
10//! - [`PersonalityState`] -- Loaded personality files (OS, firmware, identity)
11//! - [`EventBus`] -- Tokio broadcast channel for WebSocket event push
12//!
13//! ## Modules
14//!
15//! - `api` -- REST API mount point, `build_router()`, route modules
16//! - `auth` -- API key authentication middleware layer
17//! - `rate_limit` -- Global + per-IP rate limiting (sliding window)
18//! - `dashboard` -- Embedded SPA serving (compile-time or filesystem)
19//! - `ws` -- WebSocket upgrade and event broadcasting
20//! - `config_runtime` -- Runtime config parsing, hot-reload, and apply
21//! - `cron_runtime` -- Background cron task execution
22//! - `abuse` -- Abuse detection and protection
23
24pub mod abuse;
25pub mod api;
26pub mod auth;
27pub mod config_runtime;
28pub mod cron_runtime;
29pub mod dashboard;
30pub mod rate_limit;
31pub mod ws;
32pub mod ws_ticket;
33
34pub use api::{AppState, PersonalityState, build_mcp_router, build_public_router, build_router};
35pub use dashboard::{build_dashboard_html, dashboard_handler};
36pub use ws::{EventBus, ws_route};
37pub use ws_ticket::TicketStore;