systemprompt-runtime 0.2.1

Application runtime for systemprompt.io AI governance infrastructure. AppContext, lifecycle builder, extension registry, and module wiring for the MCP governance pipeline.
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
use anyhow::Result;
use systemprompt_database::{
    DatabaseProvider, install_module_schemas_from_source, install_module_seeds_from_path,
};
use systemprompt_models::modules::Module;

use crate::AppContext;

pub async fn install_module(module: &Module) -> Result<()> {
    let app_context = AppContext::new().await?;
    install_module_with_db(module, app_context.db_pool().as_ref()).await
}

pub async fn install_module_with_db(module: &Module, db: &dyn DatabaseProvider) -> Result<()> {
    install_module_schemas_from_source(module, db).await?;
    install_module_seeds_from_path(module, db).await?;
    Ok(())
}