/// Shared application state for all request handlers. use engram_core::EngramDb; use engram_projection::registry::ProjectionRegistry; use engram_sync::SyncEngine; use engram_tx::TransactionEngine; use std::sync::{Arc, Mutex}; pub struct AppState { /// Local database — uses std::sync::Mutex (sync ops only, fast) pub db: Arc>, /// Sync engine — uses tokio::sync::Mutex so it can be held across .await pub sync_engine: Arc>, /// API key used to authenticate incoming sync requests pub api_key: String, /// Projection registry — named schema views over the activation surface pub projection_registry: Arc>, /// Transaction engine — append-only command log with rollback support pub tx_engine: Arc>, }