Expand description
Filesystem backend abstraction.
FsBackend is the trait boundary between the fs tool family (read_file /
write_file / edit_file) and the underlying I/O. Two implementations:
defect_tools::fs::LocalFsBackend: writes directly to diskdefect_acp::fs::AcpFsBackend: delegates to the client via ACPfs/read_text_file/fs/write_text_filereverse requests
Assembly is handled in the defect-acp session/new handler — the backend is
selected based on the client’s FileSystemCapabilities negotiation result and
injected into crate::session::AgentCore::create_session.
Structs§
- Fingerprint
- A fingerprint of file content. Used with
FsBackend::fingerprintandFingerprint::of:edit_filerecords the fingerprint after reading, and takes it again before writing; a mismatch indicates a concurrent write conflict. - Noop
FsBackend - A no-op fs backend for testing only. All methods return
FsError::NotPermitted, allowing test scenarios that requireArc<dyn FsBackend>(without actually running fs tools) to skip setup.
Enums§
- FsError
- Fs backend error.
Traits§
- FsBackend
- Fs backend trait.
Functions§
- resolve_
workspace_ path - Resolves a request path to an absolute path within the workspace, verifying it does not escape.