systemprompt-models 0.2.1

Foundation data models for systemprompt.io AI governance infrastructure. Shared DTOs, config, and domain types consumed by every layer of the MCP governance pipeline.
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
use serde::Serialize;
use serde_json::Value as JsonValue;

use super::types::ArtifactType;

pub trait Artifact: Serialize {
    fn artifact_type(&self) -> ArtifactType;
    fn to_schema(&self) -> JsonValue;

    fn to_json_value(&self) -> Result<JsonValue, serde_json::Error> {
        serde_json::to_value(self)
    }
}

pub trait ArtifactSchema {
    fn generate_schema(&self) -> JsonValue;
}