systemprompt-identifiers 0.72.1

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
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
//! Replica identity and the keys replicas coordinate on.
//!
//! `LeaseKey` names a resource one replica at a time may own for a bounded
//! time; `AdvisoryLockKey` names a session-scoped cluster-wide lock.
//!
//! Copyright (c) systemprompt.io — Business Source License 1.1.
//! See <https://systemprompt.io> for licensing details.

crate::define_id!(InstanceId, checked, |value| {
    crate::macros::validate_non_empty("InstanceId", value)
});
crate::define_id!(LeaseKey, checked, |value| {
    crate::macros::validate_non_empty("LeaseKey", value)
});
crate::define_id!(AdvisoryLockKey, checked, |value| {
    crate::macros::validate_non_empty("AdvisoryLockKey", value)
});