systemprompt_loader/module_loader.rs
1//! Thin wrapper around the `inventory`-driven extension registry.
2//!
3//! Re-exported here so that the extension framework, the schema
4//! collector, and [`crate::ConfigLoader`] are all reachable from a single
5//! re-export point in this crate.
6
7use std::sync::Arc;
8use systemprompt_extension::{Extension, SchemaDefinition};
9
10use crate::modules;
11
12#[derive(Debug, Clone, Copy)]
13pub struct ModuleLoader;
14
15impl ModuleLoader {
16 #[must_use]
17 pub fn discover_extensions() -> Vec<Arc<dyn Extension>> {
18 modules::discover_extensions()
19 }
20
21 #[must_use]
22 pub fn collect_extension_schemas() -> Vec<SchemaDefinition> {
23 modules::collect_extension_schemas()
24 }
25}