#![recursion_limit = "1024"]

pub mod acp_bridge;
pub mod acp_client;
pub mod acp_runtime;
pub mod acp_session_manager;
pub mod acp_types;
pub mod app;
pub mod context;
pub mod document_buffer_store;
pub mod editor_actor;
pub mod error;
pub mod hermes_tools;
pub mod local_folder_watcher_registry;
pub mod middleware;
pub mod page_aggregate;
pub mod routes;
pub mod ssr;
pub mod transport;
pub mod tree_shell;
pub mod workspace_shell;

pub use app::{build_app, AppConfig, AppState};

#[cfg(test)]
pub(crate) mod test_support {
    use std::sync::{Mutex, OnceLock};

    pub(crate) fn hermes_env_lock() -> &'static Mutex<()> {
        static LOCK: OnceLock<Mutex<()>> = OnceLock::new();
        LOCK.get_or_init(|| Mutex::new(()))
    }
}
