pub struct WorkspaceFilePolicy { /* private fields */ }Expand description
The policy for tools confined to a Workspace.
Implementations§
Trait Implementations§
Source§impl Clone for WorkspaceFilePolicy
impl Clone for WorkspaceFilePolicy
Source§impl Debug for WorkspaceFilePolicy
impl Debug for WorkspaceFilePolicy
Source§impl FilePolicy for WorkspaceFilePolicy
impl FilePolicy for WorkspaceFilePolicy
Source§fn is_secret_ignoring_name_shape(&self, path: &Path) -> bool
fn is_secret_ignoring_name_shape(&self, path: &Path) -> bool
FilePolicy::is_secret without name-shape rules, for .env.example
style templates, which are judged by where they live.Source§fn is_sensitive(&self, path: &Path) -> bool
fn is_sensitive(&self, path: &Path) -> bool
Paths the file tools must not change.
ProtectedPathGuard enforces
these three; add it to the agent.Source§fn declare_path(&self, path: &str) -> String
fn declare_path(&self, path: &str) -> String
The path a kernel access manifest declares for a path argument.
Source§fn attaches_images(&self) -> bool
fn attaches_images(&self) -> bool
Whether images are returned as attachments the caller can deliver.
Source§fn shell_tool_name(&self) -> &str
fn shell_tool_name(&self) -> &str
The tool named in hints that suggest running a command.
Source§fn delivery_hint(&self) -> Option<&str>
fn delivery_hint(&self) -> Option<&str>
A sentence added after an append, on delivering the finished file.
Source§fn keeps_backups(&self) -> bool
fn keeps_backups(&self) -> bool
Whether
FilePolicy::backup_before_overwrite keeps a copy.Source§fn backup_before_overwrite<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
_backend: &'life1 Arc<dyn ExecutionBackend>,
_path: &'life2 BackendPath,
) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn backup_before_overwrite<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
_backend: &'life1 Arc<dyn ExecutionBackend>,
_path: &'life2 BackendPath,
) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Keep a copy of
path before it is replaced. Best effort: a failed
backup never blocks the change.Source§fn post_write_diagnostics<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
_backend: &'life1 dyn ExecutionBackend,
_path: &'life2 Path,
) -> Pin<Box<dyn Future<Output = String> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn post_write_diagnostics<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
_backend: &'life1 dyn ExecutionBackend,
_path: &'life2 Path,
) -> Pin<Box<dyn Future<Output = String> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Text appended to a successful write, such as a syntax check.
Source§fn write_effects(
&self,
_backend: &dyn ExecutionBackend,
_arguments: &str,
) -> CallEffects
fn write_effects( &self, _backend: &dyn ExecutionBackend, _arguments: &str, ) -> CallEffects
The effects of a write call.
Source§fn plants_configuration(&self, _path: &str) -> bool
fn plants_configuration(&self, _path: &str) -> bool
Whether writing
path changes configuration that later commands run
(git configuration, for example).Auto Trait Implementations§
impl Forget for WorkspaceFilePolicy
impl Freeze for WorkspaceFilePolicy
impl Move for WorkspaceFilePolicy
impl RefUnwindSafe for WorkspaceFilePolicy
impl Send for WorkspaceFilePolicy
impl Sync for WorkspaceFilePolicy
impl Unpin for WorkspaceFilePolicy
impl UnsafeUnpin for WorkspaceFilePolicy
impl UnwindSafe for WorkspaceFilePolicy
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