Weave documentation
Rust referencel1fe-weave-core

l1fe-weave-core · filesystem::agentfs

Source declarations, signatures and documentation for filesystem::agentfs.

Reviewed implementation boundary: Some core wrappers derive transport keys from DID strings. Do not infer secret key custody or authenticated peers from a supplied DID string; inspect the chosen wrapper and transport configuration. See /libraries/weave-core/overview.

Source: sigil/weave/libs/weave-core/src/filesystem/agentfs.rs. SHA-256: d6c627b337ddcf5028cc3ba340131f3a74e04d818f2271cddbf70b5eef42f754.

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.

Module condition:

#[cfg(feature = "fs")]

filesystem::agentfs::AgentFsConfig

AgentFS configuration

#[cfg(feature = "fs")]
#[derive(Debug, Clone)]
pub struct AgentFsConfig {
/// Root directory for local storage

pub root: PathBuf,
/// Cache size in bytes

pub cache_size: usize
}

Source line: 154.

filesystem::agentfs::AgentFsEntry

Entry in AgentFS

#[cfg(feature = "fs")]
#[derive(Debug, Clone, Serialize, Deserialize)]
pub struct AgentFsEntry {
/// Local path

pub local_path: PathBuf,
/// Remote Locus path

pub remote_path: PathBuf,
/// Last sync time

pub last_sync: chrono::DateTime<chrono::Utc>,
/// Entry checksum

pub checksum: [u8; 32]
}

Source line: 172.

filesystem::agentfs::AgentFs

AgentFS instance

#[cfg(feature = "fs")]
pub struct AgentFs {

}

Source line: 184.

filesystem::agentfs::AgentFs::new

Create a new AgentFS instance

#[cfg(feature = "fs")]
pub fn new(config: AgentFsConfig, agent_did: Did, locus: Arc<Locus>) -> Result<Self>;

Source line: 199.

filesystem::agentfs::AgentFs::mount

Mount AgentFS

#[cfg(feature = "fs")]
pub async fn mount(self: &Arc<Self>) -> Result<()>;

Source line: 213.

filesystem::agentfs::AgentFs::sync

Sync with remote Locus

#[cfg(feature = "fs")]
pub async fn sync(
        &self,
        local_path: &Path,
        remote_path: &Path,
        direction: SyncDirection,
    ) -> Result<()>;

Source line: 229.

filesystem::agentfs::AgentFs::push

Push local file to remote

#[cfg(feature = "fs")]
pub async fn push(&self, local_path: &Path, remote_path: &Path) -> Result<()>;

Source line: 246.

filesystem::agentfs::AgentFs::agent_did

Get agent DID

#[cfg(feature = "fs")]
pub fn agent_did(&self) -> &Did;

Source line: 312.

filesystem::agentfs::AgentFs::list_entries

List all entries

#[cfg(feature = "fs")]
pub fn list_entries(&self) -> Vec<AgentFsEntry>;

Source line: 317.

filesystem::agentfs::SyncDirection

Sync direction

#[cfg(feature = "fs")]
#[derive(Debug, Clone, Copy)]
pub enum SyncDirection {
    /// Push local to remote
    Push,
    /// Pull remote to local
    Pull,
    /// Sync both directions
    Bidirectional,
}

Source line: 327.

On this page