pub struct WorkspacePolicy {
pub workspace_id: String,
pub root: PathBuf,
pub max_file_bytes: u64,
pub max_output_bytes: u64,
pub max_matches: usize,
pub include_hidden: bool,
pub follow_symlinks: bool,
pub allow_create: bool,
pub allow_overwrite: bool,
}Expand description
Workspace workspace policy request or result value. Creating the value does not touch the filesystem; workspace executors document read, write, edit, or search effects.
Fields§
§workspace_id: StringStable workspace id used for typed lineage, lookup, or dedupe.
root: PathBufRoot used by this record or request.
max_file_bytes: u64max file bytes used for bounds checks, summaries, or truncation evidence.
max_output_bytes: u64max output bytes used for bounds checks, summaries, or truncation evidence.
max_matches: usizeMaximum number of matches to return. Use it to keep search output bounded for model context.
Whether include hidden is enabled. Policy, validation, or routing code uses this flag to choose the explicit behavior.
follow_symlinks: boolWhether follow symlinks is enabled. Policy, validation, or routing code uses this flag to choose the explicit behavior.
allow_create: boolBoolean policy/capability flag for whether allow create is enabled.
allow_overwrite: boolBoolean policy/capability flag for whether allow overwrite is enabled.
Implementations§
Source§impl WorkspacePolicy
impl WorkspacePolicy
Sourcepub fn new(root: impl Into<PathBuf>) -> Self
pub fn new(root: impl Into<PathBuf>) -> Self
Creates a new workspace::policy value with explicit caller-provided inputs. This constructor is data-only and performs no I/O or external side effects.
Sourcepub fn bounds_snapshot(
&self,
root_policy_ref: PolicyRef,
) -> WorkspaceBoundsSnapshot
pub fn bounds_snapshot( &self, root_policy_ref: PolicyRef, ) -> WorkspaceBoundsSnapshot
Returns the bounds snapshot currently held by this value. This snapshots workspace bounds policy metadata without reading or writing workspace files.
Trait Implementations§
Source§impl Clone for WorkspacePolicy
impl Clone for WorkspacePolicy
Source§fn clone(&self) -> WorkspacePolicy
fn clone(&self) -> WorkspacePolicy
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more