Skip to main content

mobius_gateway/
lib.rs

1//! Authenticated, frontend-neutral access to independent möbius chats.
2
3mod assembly;
4pub mod auth;
5pub mod bots;
6mod chats;
7pub mod client;
8mod cloudflare;
9pub mod command;
10mod computer_runtime;
11pub mod config;
12mod extensions;
13mod host;
14mod middleware_manifest;
15mod provider_catalog;
16mod publication;
17mod routines;
18pub mod sandbox;
19pub mod server;
20pub mod wire;
21
22/// Errors returned by the gateway library.
23#[derive(Debug, thiserror::Error)]
24pub enum Error {
25    #[error("gateway configuration error: {0}")]
26    Config(String),
27    #[error("gateway protocol error: {0}")]
28    Protocol(String),
29    #[error("gateway authentication failed")]
30    Unauthorized,
31    #[error(transparent)]
32    Mobius(#[from] mobius::Error),
33    #[error(transparent)]
34    Io(#[from] std::io::Error),
35    #[error(transparent)]
36    Json(#[from] serde_json::Error),
37    #[error("Bot storage error")]
38    Sqlite(#[from] rusqlite::Error),
39}
40
41/// Result type shared by gateway modules.
42pub type Result<T> = std::result::Result<T, Error>;