systemprompt-identifiers 0.6.0

Typed newtype identifiers (UserId, TraceId, AgentId, McpServerId…) for systemprompt.io AI governance infrastructure. Enforces type-safe IDs across every boundary in the MCP governance pipeline.
Documentation
//! User identifier with `system` and `anonymous` constants.

crate::define_id!(UserId, schema);

impl UserId {
    pub fn anonymous() -> Self {
        Self("anonymous".to_string())
    }

    pub fn system() -> Self {
        Self("system".to_string())
    }

    pub fn is_system(&self) -> bool {
        self.0 == "system"
    }

    pub fn is_anonymous(&self) -> bool {
        self.0 == "anonymous"
    }
}