pub struct RealDiskFileStore { /* private fields */ }Expand description
A SessionFileSystem rooted at a real host directory.
Paths are interpreted per the session filesystem namespace rules (leading /,
optional /workspace prefix, .. rejected anywhere). session_id is
accepted on every method but ignored — the store is single-workspace per
process. See specs/file-store.md for the multi-tenant upgrade path.
is_readonly flags from seed_initial_file are tracked in an in-memory
set (the disk backend has no place to persist them), so writes and
deletes through this store still honor the trait contract within a
single process. The flag is not mapped onto filesystem permissions —
other host processes can still modify the file directly.
Implementations§
Trait Implementations§
Source§impl Clone for RealDiskFileStore
impl Clone for RealDiskFileStore
Source§fn clone(&self) -> RealDiskFileStore
fn clone(&self) -> RealDiskFileStore
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for RealDiskFileStore
impl Debug for RealDiskFileStore
Source§impl SessionFileSystem for RealDiskFileStore
impl SessionFileSystem for RealDiskFileStore
Source§fn display_root(&self) -> String
fn display_root(&self) -> String
A real-disk store shows where files actually live: the host-absolute root.
(Behind MountFs the model still sees a stable /workspace.)
Source§fn display_path(&self, path: &str) -> String
fn display_path(&self, path: &str) -> String
Source§fn seed_initial_file<'life0, 'life1, 'async_trait>(
&'life0 self,
session_id: SessionId,
file: &'life1 InitialFile,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn seed_initial_file<'life0, 'life1, 'async_trait>(
&'life0 self,
session_id: SessionId,
file: &'life1 InitialFile,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Source§fn read_file<'life0, 'life1, 'async_trait>(
&'life0 self,
session_id: SessionId,
path: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<Option<SessionFile>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn read_file<'life0, 'life1, 'async_trait>(
&'life0 self,
session_id: SessionId,
path: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<Option<SessionFile>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Source§fn write_file<'life0, 'life1, 'life2, 'life3, 'async_trait>(
&'life0 self,
session_id: SessionId,
path: &'life1 str,
content: &'life2 str,
encoding: &'life3 str,
) -> Pin<Box<dyn Future<Output = Result<SessionFile>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
fn write_file<'life0, 'life1, 'life2, 'life3, 'async_trait>(
&'life0 self,
session_id: SessionId,
path: &'life1 str,
content: &'life2 str,
encoding: &'life3 str,
) -> Pin<Box<dyn Future<Output = Result<SessionFile>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
Source§fn delete_file<'life0, 'life1, 'async_trait>(
&'life0 self,
_session_id: SessionId,
path: &'life1 str,
recursive: bool,
) -> Pin<Box<dyn Future<Output = Result<bool>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn delete_file<'life0, 'life1, 'async_trait>(
&'life0 self,
_session_id: SessionId,
path: &'life1 str,
recursive: bool,
) -> Pin<Box<dyn Future<Output = Result<bool>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Source§fn list_directory<'life0, 'life1, 'async_trait>(
&'life0 self,
session_id: SessionId,
path: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<Vec<FileInfo>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn list_directory<'life0, 'life1, 'async_trait>(
&'life0 self,
session_id: SessionId,
path: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<Vec<FileInfo>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Source§fn stat_file<'life0, 'life1, 'async_trait>(
&'life0 self,
_session_id: SessionId,
path: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<Option<FileStat>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn stat_file<'life0, 'life1, 'async_trait>(
&'life0 self,
_session_id: SessionId,
path: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<Option<FileStat>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Source§fn grep_files<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
_session_id: SessionId,
pattern: &'life1 str,
path_pattern: Option<&'life2 str>,
) -> Pin<Box<dyn Future<Output = Result<Vec<GrepMatch>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn grep_files<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
_session_id: SessionId,
pattern: &'life1 str,
path_pattern: Option<&'life2 str>,
) -> Pin<Box<dyn Future<Output = Result<Vec<GrepMatch>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Source§fn create_directory<'life0, 'life1, 'async_trait>(
&'life0 self,
session_id: SessionId,
path: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<FileInfo>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn create_directory<'life0, 'life1, 'async_trait>(
&'life0 self,
session_id: SessionId,
path: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<FileInfo>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Source§fn resolve_path(&self, input: &str) -> String
fn resolve_path(&self, input: &str) -> String
Source§fn write_file_if_content_matches<'life0, 'life1, 'life2, 'life3, 'life4, 'life5, 'async_trait>(
&'life0 self,
session_id: TypedId<SessionIdMarker>,
path: &'life1 str,
expected_content: &'life2 str,
expected_encoding: &'life3 str,
content: &'life4 str,
encoding: &'life5 str,
) -> Pin<Box<dyn Future<Output = Result<Option<SessionFile>, AgentLoopError>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
'life4: 'async_trait,
'life5: 'async_trait,
Self: 'async_trait,
fn write_file_if_content_matches<'life0, 'life1, 'life2, 'life3, 'life4, 'life5, 'async_trait>(
&'life0 self,
session_id: TypedId<SessionIdMarker>,
path: &'life1 str,
expected_content: &'life2 str,
expected_encoding: &'life3 str,
content: &'life4 str,
encoding: &'life5 str,
) -> Pin<Box<dyn Future<Output = Result<Option<SessionFile>, AgentLoopError>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
'life4: 'async_trait,
'life5: 'async_trait,
Self: 'async_trait,
Auto Trait Implementations§
impl !RefUnwindSafe for RealDiskFileStore
impl !UnwindSafe for RealDiskFileStore
impl Freeze for RealDiskFileStore
impl Send for RealDiskFileStore
impl Sync for RealDiskFileStore
impl Unpin for RealDiskFileStore
impl UnsafeUnpin for RealDiskFileStore
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> FutureExt for T
impl<T> FutureExt for T
Source§fn with_context(self, otel_cx: Context) -> WithContext<Self>
fn with_context(self, otel_cx: Context) -> WithContext<Self>
Source§fn with_current_context(self) -> WithContext<Self>
fn with_current_context(self) -> WithContext<Self>
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
Source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
T in a tonic::Request