systemprompt-loader 0.10.2

File and module discovery infrastructure for systemprompt.io AI governance — manifests, schemas, and extension loading. Separates I/O from shared models in the MCP governance pipeline.
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
use std::sync::Arc;
use systemprompt_extension::{Extension, ExtensionRegistry, LoaderError, SchemaDefinition};

pub fn discover_extensions() -> Result<Vec<Arc<dyn Extension>>, LoaderError> {
    Ok(ExtensionRegistry::discover()?.extensions().to_vec())
}

pub fn collect_extension_schemas() -> Result<Vec<SchemaDefinition>, LoaderError> {
    let registry = ExtensionRegistry::discover()?;
    Ok(registry
        .schema_extensions()
        .into_iter()
        .flat_map(|ext| ext.schemas())
        .collect())
}