upgrade Skill system auf regitry
This commit is contained in:
@@ -3,33 +3,19 @@
|
||||
use serde::Deserialize;
|
||||
use crate::chat::types::AgentChatConfig;
|
||||
|
||||
/// Wurzel der gesamten Nazarick-Konfiguration.
|
||||
/// Entspricht dem obersten Level in config.toml.
|
||||
#[derive(Debug, Deserialize)]
|
||||
pub struct NazarickConfig {
|
||||
/// Alles unter [chat] in config.toml
|
||||
pub chat: ChatConfig,
|
||||
}
|
||||
|
||||
/// Konfiguration für den Chat-Connector.
|
||||
/// Entspricht dem [chat]-Block in config.toml.
|
||||
#[derive(Debug, Deserialize)]
|
||||
pub struct ChatConfig {
|
||||
/// Port auf dem Nazarick auf eingehende Webhooks lauscht
|
||||
pub listen_port: u16,
|
||||
|
||||
/// Synology User-ID des Admins — bekommt System-Benachrichtigungen
|
||||
pub admin_user_id: u64,
|
||||
|
||||
/// Basis Webhook URL für Admin-Benachrichtigungen — ohne user_ids Parameter
|
||||
pub admin_webhook_url: String,
|
||||
|
||||
/// Liste aller konfigurierten Bot-Agenten
|
||||
pub agents: Vec<AgentChatConfig>,
|
||||
}
|
||||
|
||||
/// Lädt die Konfiguration aus config.toml im Arbeitsverzeichnis.
|
||||
/// Gibt einen Fehler zurück wenn die Datei fehlt oder ungültig ist.
|
||||
pub fn load() -> anyhow::Result<NazarickConfig> {
|
||||
let content = std::fs::read_to_string("config/config.toml")?;
|
||||
let config = toml::from_str(&content)?;
|
||||
|
||||
Reference in New Issue
Block a user