pub struct AgentContext {
pub agent_id: AgentId,
pub agent_name: String,
pub cspace: Arc<CSpace>,
}Expand description
Agent security context — unforgeable proof of agent identity.
This type can only be created by:
KernelHandleduring agent lifecycle (production)AgentContext::test_fixture()in#[cfg(test)]only
Tools that require access control accept AgentContext instead of
a raw Option<String>. The type’s existence is itself proof that
the kernel has authenticated the agent.
Fields§
§agent_id: AgentIdUnique agent identifier.
agent_name: StringHuman-readable agent name for permission lookups.
cspace: Arc<CSpace>Agent’s capability space — determines which tools the agent can access.
Trait Implementations§
Source§impl Clone for AgentContext
impl Clone for AgentContext
Source§fn clone(&self) -> AgentContext
fn clone(&self) -> AgentContext
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for AgentContext
impl Debug for AgentContext
Auto Trait Implementations§
impl Freeze for AgentContext
impl RefUnwindSafe for AgentContext
impl Send for AgentContext
impl Sync for AgentContext
impl Unpin for AgentContext
impl UnsafeUnpin for AgentContext
impl UnwindSafe for AgentContext
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
Mutably borrows from an owned value. Read more