pub struct RelianceDeclaration {
pub declaring_agent: AgentRef,
pub capacity: Option<String>,
pub permitted: Vec<AgentRef>,
pub effective_from_unix: u32,
}Expand description
A standing declaration (capacity-level) of the agents/tools an agent MAY use, so a principal can
evaluate and consent to the toolchain before relying on the agent (§8.2). This is not the per-judgement
record; it is the up-front permission surface against which has_undeclared_ai checks actual reliance.
Fields§
§declaring_agent: AgentRefThe agent making the declaration (typically a natural person in a professional capacity).
capacity: Option<String>The role/capacity term id this declaration is scoped to, if any.
permitted: Vec<AgentRef>The agents/tools the declaring agent is permitted to rely upon (matched by AgentRef.id).
effective_from_unix: u32When the declaration takes effect (unix seconds). u32 is intentional (a coarse effective-date,
not a high-precision timestamp).
Implementations§
Source§impl RelianceDeclaration
impl RelianceDeclaration
Sourcepub fn new(declaring_agent: AgentRef, effective_from_unix: u32) -> Self
pub fn new(declaring_agent: AgentRef, effective_from_unix: u32) -> Self
A new declaration effective from effective_from_unix, permitting nothing until tools are added.
Sourcepub fn with_capacity(self, capacity: impl Into<String>) -> Self
pub fn with_capacity(self, capacity: impl Into<String>) -> Self
Scope the declaration to a capacity/credential term id (fluent).
Sourcepub fn permit(self, agent: AgentRef) -> Self
pub fn permit(self, agent: AgentRef) -> Self
Permit reliance on an agent/tool (fluent, chainable).
Sourcepub fn permits_id(&self, id: &str) -> bool
pub fn permits_id(&self, id: &str) -> bool
True if an agent id is covered by this declaration’s permitted set.