upgrade Skill system auf regitry

This commit is contained in:
Sithies
2026-03-17 21:51:00 +01:00
parent 389c759166
commit 4e6b2c6759
28 changed files with 534 additions and 478 deletions
+12 -24
View File
@@ -1,10 +1,6 @@
// crates/lyra/src/lib.rs
//
// Lyra — Persönlicher Begleit-Agent von Nazarick.
// Dünner Wrapper um BaseAgent — nur name() ist Lyra-spezifisch.
use std::sync::Arc;
use nazarick_core::agent::{BaseAgent, PersonalityWriter};
use nazarick_core::agent::base::BaseAgent;
use nazarick_core::agent::skill_registry::SkillRegistry;
use nazarick_core::traits::Agent;
use nazarick_core::types::AgentId;
use nazarick_core::llm::LlmProvider;
@@ -14,42 +10,34 @@ pub struct Lyra {
}
impl Lyra {
/// Erstellt eine neue Sebas-Instanz.
/// `shared_core_path` → Pfad zu shared_core.md (systemweit)
/// `soul_core_path` → Pfad zu soul_core.md (Sebas-spezifisch)
/// `soul_personality_path` → Pfad zu soul_personality.md (veränderlich)
/// `llm` → LLM-Provider
/// `personality_writer` → Skill-Implementierung für Persönlichkeits-Updates
pub fn new(
agent_id: impl Into<String>,
shared_core_path: impl Into<String>,
soul_core_path: impl Into<String>,
soul_personality_path: impl Into<String>,
llm: Box<dyn LlmProvider>,
personality_writer: Arc<dyn PersonalityWriter>,
registry: Arc<SkillRegistry>,
max_tokens: u32,
max_loops: u32,
) -> Self {
Self {
base: BaseAgent::new(
agent_id,
shared_core_path,
soul_core_path,
soul_personality_path,
llm,
personality_writer,
registry,
max_tokens,
max_loops,
),
}
}
/// Delegiert chat() an BaseAgent.
pub async fn chat(&mut self, user_message: &str) -> nazarick_core::types::Result<String> {
self.base.chat(user_message).await
}
}
impl Agent for Lyra {
fn id(&self) -> AgentId {
self.base.id
}
fn name(&self) -> &str {
"Lyra"
}
fn id(&self) -> AgentId { self.base.id }
fn name(&self) -> &str { "Lyra" }
}