pub enum Constraint {
Show 23 variants
PathPrefix(String),
DomainExact(String),
DomainGlob(String),
RegexMatch(String),
MaxLength(usize),
MaxArgsSize(usize),
GovernedIntentRequired,
RequireApprovalAbove {
threshold_units: u64,
},
SellerExact(String),
MinimumRuntimeAssurance(RuntimeAssuranceTier),
MinimumAutonomyTier(GovernedAutonomyTier),
Custom(String, String),
TableAllowlist(Vec<String>),
ColumnDenylist(Vec<String>),
MaxRowsReturned(u64),
OperationClass(SqlOperationClass),
AudienceAllowlist(Vec<String>),
ContentReviewTier(ContentReviewTier),
MaxTransactionAmountUsd(String),
RequireDualApproval(bool),
ModelConstraint {
allowed_model_ids: Vec<String>,
min_safety_tier: Option<ModelSafetyTier>,
},
MemoryStoreAllowlist(Vec<String>),
MemoryWriteDenyPatterns(Vec<String>),
}Expand description
A constraint on tool parameters.
Variants§
PathPrefix(String)
File path parameter must start with this prefix.
DomainExact(String)
Network domain must match exactly.
DomainGlob(String)
Network domain must match a glob pattern.
RegexMatch(String)
Parameter must match a regular expression.
MaxLength(usize)
String parameter must not exceed this length.
MaxArgsSize(usize)
Serialized argument payload must not exceed this many bytes.
GovernedIntentRequired
Requests must carry a governed transaction intent.
RequireApprovalAbove
Requests at or above this threshold require a valid approval token.
SellerExact(String)
Requests must carry commerce approval context for this exact seller.
MinimumRuntimeAssurance(RuntimeAssuranceTier)
Governed requests must carry valid runtime attestation at or above this tier.
MinimumAutonomyTier(GovernedAutonomyTier)
Governed requests at or above this autonomy tier must carry autonomy context and pass bond gating.
Custom(String, String)
Extensibility: arbitrary key-value constraint.
TableAllowlist(Vec<String>)
Data layer: database tables the grant may reference.
Evaluated against parsed SQL by chio-data-guards; the kernel
records the constraint and leaves enforcement to that guard.
ColumnDenylist(Vec<String>)
Data layer: forbidden columns, formatted as "table.column".
Evaluated by chio-data-guards; kernel treats it as an advisory
constraint and does not reject at the request-matching stage.
MaxRowsReturned(u64)
Data layer: maximum number of rows a query may return.
Enforced post-invocation by downstream result-shaping guards.
OperationClass(SqlOperationClass)
Data layer: operation class the grant authorises.
AudienceAllowlist(Vec<String>)
Communication: allowed recipient channels or IDs.
ContentReviewTier(ContentReviewTier)
Communication: content review tier demanded of downstream guards.
MaxTransactionAmountUsd(String)
Financial: maximum transaction amount in USD.
The value is a decimal string (e.g. "100.00") because
rust_decimal is not in the workspace.
RequireDualApproval(bool)
Financial: whether the grant requires dual approval before execution.
ModelConstraint
Model routing: constrain the models this grant may execute under.
Fields
min_safety_tier: Option<ModelSafetyTier>Minimum acceptable model safety tier, if any.
MemoryStoreAllowlist(Vec<String>)
Memory governance: memory stores the grant may write to.
MemoryWriteDenyPatterns(Vec<String>)
Memory governance: regex patterns that block writes.
Patterns are compiled lazily during kernel evaluation so invalid regexes do not break construction or round-trip serialization.
Trait Implementations§
Source§impl Clone for Constraint
impl Clone for Constraint
Source§fn clone(&self) -> Constraint
fn clone(&self) -> Constraint
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more