systemprompt-extension 0.2.1

Compile-time extension framework for systemprompt.io AI governance infrastructure. Built on the inventory crate — registers schemas, API routes, jobs, and providers in the MCP governance pipeline.
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
use std::sync::Arc;
use systemprompt_traits::{ConfigProvider, DatabaseHandle};

pub trait ExtensionContext: Send + Sync {
    fn config(&self) -> Arc<dyn ConfigProvider>;

    fn database(&self) -> Arc<dyn DatabaseHandle>;

    fn get_extension(&self, id: &str) -> Option<Arc<dyn crate::Extension>>;

    fn has_extension(&self, id: &str) -> bool {
        self.get_extension(id).is_some()
    }
}

pub type DynExtensionContext = Arc<dyn ExtensionContext>;