pub struct PolicyPack {
pub name: String,
pub version: String,
pub description: String,
pub extends: Option<String>,
pub context: ContextRules,
pub redaction: BTreeMap<String, String>,
pub filters: FilterRules,
pub egress: EgressRules,
pub routing: RoutingPolicyRules,
pub budgets: BudgetRules,
}Expand description
One policy pack as written in TOML. Unknown keys are rejected so a typo
(alow_tools) fails validation instead of silently weakening a policy.
Fields§
§name: StringStable identifier: lowercase, digits and hyphens (finance-eu).
version: StringSemantic version of the pack itself (1.0.0).
description: StringOne-line human description.
extends: Option<String>Optional parent pack (built-in name) this pack inherits from.
context: ContextRulesContext-governance expectations.
redaction: BTreeMap<String, String>Named redaction patterns: name → regex (matched against content before it enters the model context).
filters: FilterRulesInbound content filters (PII / classification / prompt-injection) — the input side of the Great Filter (GL #675).
egress: EgressRulesEgress/output DLP on agent writes & actions (GL #676).
routing: RoutingPolicyRulesGateway routing governance: model allowlist + downgrade exemptions (enterprise#25). Enforced by the org gateway under a signed policy.
budgets: BudgetRulesHard org spend caps per person/project (enterprise#25).
Trait Implementations§
Source§impl Clone for PolicyPack
impl Clone for PolicyPack
Source§fn clone(&self) -> PolicyPack
fn clone(&self) -> PolicyPack
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for PolicyPack
impl Debug for PolicyPack
Source§impl<'de> Deserialize<'de> for PolicyPack
impl<'de> Deserialize<'de> for PolicyPack
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Auto Trait Implementations§
impl Freeze for PolicyPack
impl RefUnwindSafe for PolicyPack
impl Send for PolicyPack
impl Sync for PolicyPack
impl Unpin for PolicyPack
impl UnsafeUnpin for PolicyPack
impl UnwindSafe for PolicyPack
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
impl<A, B, T> HttpServerConnExec<A, B> for Twhere
B: Body,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more