Expand description
§roboticus-server
Top-level binary crate that assembles all Roboticus workspace crates into a
single runtime. The bootstrap() function initializes the database,
wallet, LLM pipeline, agent loop, channel adapters, and background daemons,
then returns an axum Router ready to serve.
§Key Types
AppState– Shared application state passed to all route handlersPersonalityState– Loaded personality files (OS, firmware, identity)EventBus– Tokio broadcast channel for WebSocket event push
§Modules
api– REST API mount point,build_router(), route modulesauth– API key authentication middleware layerrate_limit– Global + per-IP rate limiting (sliding window)dashboard– Embedded SPA serving (compile-time or filesystem)ws– WebSocket upgrade and event broadcastingcli/– CLI command handlers (serve, status, sessions, memory, wallet, etc.)daemon– Daemon install, status, uninstallmigrate/– Migration engine, skill import/exportplugins– Plugin registry initialization and loading
§Bootstrap Sequence
- Parse CLI → load config → init DB → load wallet → generate HMAC secret
- Init LLM client + router + embedding → load semantic cache
- Init agent loop + tool registry + memory retriever
- Register channel adapters (Telegram, WhatsApp, Discord, Signal)
- Spawn background daemons (heartbeat, cron, cache flush, ANN rebuild)
- Build axum router with auth + CORS + rate limiting
Re-exports§
pub use roboticus_api as api_crate;
Modules§
- abuse
- Abuse signal aggregation and enforcement.
- api
- auth
- cli
- config_
maintenance - config_
runtime - cron_
runtime - daemon
- dashboard
- migrate
- plugins
- rate_
limit - Global API rate limiting (fixed window, Clone-friendly for axum Router).
- state_
hygiene - ws
- ws_
ticket - Short-lived, single-use tickets for WebSocket authentication.
Structs§
- AppState
- Event
Bus - Personality
State - Holds the composed personality text plus metadata for status display.
- Ticket
Store - In-memory store for short-lived WebSocket upgrade tickets.
Functions§
- bootstrap
- Builds the application state and router from config. Used by the binary and by tests.
- bootstrap_
with_ config_ path - build_
dashboard_ html - build_
mcp_ router - Builds an axum
Routerthat serves the MCP protocol endpoint. - build_
public_ router - Routes that must be accessible without API key authentication (webhooks from external services, discovery endpoints).
- build_
router - dashboard_
handler - enable_
stderr_ logging - ws_
route - Returns an axum GET route handler that upgrades the connection to WebSocket.