pub mod http;
pub mod stdio;

use atlas::registry::SkillRegistry;

use crate::gateway::ToolGateway;
use crate::permission::{PermissionEngine, PermissionModel};
use crate::registry::ToolRegistry;

pub struct NexusServer {
    pub gateway: ToolGateway,
}

impl NexusServer {
    pub fn new(model: PermissionModel) -> Self {
        let manifests = ToolRegistry::default_registry();
        let skills = SkillRegistry::default_registry();
        let permission = PermissionEngine::new(model);
        Self {
            gateway: ToolGateway::new(manifests, skills, permission),
        }
    }
}

impl Default for NexusServer {
    fn default() -> Self {
        Self::new(PermissionModel::permissive())
    }
}
