Load skills from a directory (eager — scans immediately into a registry).
(mut self, dir: impl AsRef<std::path::Path>)
| 233 | |
| 234 | /// Load skills from a directory (eager — scans immediately into a registry). |
| 235 | pub fn with_skills_from_dir(mut self, dir: impl AsRef<std::path::Path>) -> Self { |
| 236 | let registry = self |
| 237 | .skill_registry |
| 238 | .unwrap_or_else(|| Arc::new(crate::skills::SkillRegistry::new())); |
| 239 | if let Err(e) = registry.load_from_dir(&dir) { |
| 240 | tracing::warn!( |
| 241 | dir = %dir.as_ref().display(), |
| 242 | error = %e, |
| 243 | "Failed to load skills from directory — continuing without them" |
| 244 | ); |
| 245 | } |
| 246 | self.skill_registry = Some(registry); |
| 247 | self |
| 248 | } |
| 249 | |
| 250 | /// Set a custom memory store |
| 251 | pub fn with_memory(mut self, store: Arc<dyn MemoryStore>) -> Self { |