weave-agentfs · agent
Source declarations, signatures and documentation for agent.
Source: sigil/weave/local/agentfs/src/agent.rs. SHA-256: 73a7fcee3bf598a04b29626cbf7b5be95193339243307bf010cc1def88a50c92.
This reference follows declared source modules, retains conditional attributes, and includes public declarations and implementation methods. Private-module re-exports and trait resolution require the compiler; this is a source reference, not a claim that every listed item is a root import. Function bodies and constant values are omitted.
agent::AgentContext
Agent context for file operations
#[derive(Debug, Clone, Serialize, Deserialize)]
pub struct AgentContext {
/// Agent identity performing the operation
pub agent_identity: Identity,
/// Organization identity the agent belongs to
pub organization_identity: Identity,
/// Agent capabilities
pub capabilities: Vec<String>
}Source line: 13.
agent::AgentContext::new
Create a new agent context
pub fn new(agent_identity: Identity, organization_identity: Identity) -> Self;Source line: 26.
agent::AgentContext::verify_organization
Check if agent belongs to organization using the adapter
#[allow(dead_code)]
pub async fn verify_organization(
&self,
org_identity: &Identity,
_adapter: &Arc<dyn WeaveIdentityAdapter>,
) -> Result<()>;Source line: 36.
agent::AgentContext::has_capability
Check if agent has capability
#[allow(dead_code)]
pub fn has_capability(&self, capability: &str) -> bool;Source line: 55.
agent::AgentContext::add_capability
Add capability to agent
#[allow(dead_code)]
pub fn add_capability(&mut self, capability: String);Source line: 61.
agent::AgentContext::remote_locus
Remote Locus networking is not wired in this build — fail-closed. Callers must not treat a missing handle as "not connected yet"; it is Unsupported.
pub fn remote_locus(&self) -> Result<std::sync::Arc<locus::Locus>>;Source line: 69.
agent::AgentRegistry
Agent registry for tracking active agents
#[derive(Debug, Default)]
pub struct AgentRegistry {
}Source line: 76.
agent::AgentRegistry::new
Create a new agent registry
pub fn new() -> Self;Source line: 83.
agent::AgentRegistry::register
Register an agent
pub fn register(&mut self, context: AgentContext);Source line: 88.
agent::AgentRegistry::get
Get agent context by identity
#[allow(dead_code)]
pub fn get(&self, agent_identity: &Identity) -> Option<&AgentContext>;Source line: 95.
agent::AgentRegistry::unregister
Remove agent
#[allow(dead_code)]
pub fn unregister(&mut self, agent_identity: &Identity) -> Option<AgentContext>;Source line: 101.
agent::AgentRegistry::list_agents
List all registered agent identities
#[allow(dead_code)]
pub fn list_agents(&self) -> Vec<&Identity>;Source line: 107.
agent::AgentRegistry::is_registered
Check if agent is registered
#[allow(dead_code)]
pub fn is_registered(&self, agent_identity: &Identity) -> bool;Source line: 116.