pub struct WorkspaceProcessRunnerFactory { /* private fields */ }Expand description
Builds a workspace runner from an approved permission request.
Filesystem access stays governed by the configured path rules and the
session-scoped capabilities explicitly retained by the runtime. Ordinary
paths, host integrations, and outbound network are retained only when
approved with merry_core::ApprovalScope::Session; explicitly reviewed
paths and protected metadata remain strictly action-scoped.
Implementations§
Source§impl WorkspaceProcessRunnerFactory
impl WorkspaceProcessRunnerFactory
Sourcepub fn new_at_workspace_root(root: impl Into<PathBuf>) -> Self
pub fn new_at_workspace_root(root: impl Into<PathBuf>) -> Self
Creates a workspace-sandbox runner factory rooted at a workspace path.
Sourcepub fn read_only_workspace(self) -> Self
pub fn read_only_workspace(self) -> Self
Keeps the workspace readable and not writable for every child runner.
Sourcepub fn with_environment(self, environment: WorkspaceProcessEnvironment) -> Self
pub fn with_environment(self, environment: WorkspaceProcessEnvironment) -> Self
Sets the environment layout used by every materialized child runner.
Sourcepub fn with_path_rules(
self,
rules: impl IntoIterator<Item = PathAccessRule>,
) -> Self
pub fn with_path_rules( self, rules: impl IntoIterator<Item = PathAccessRule>, ) -> Self
Installs trusted path rules shared by each materialized runner.
Sourcepub fn with_network_policy(self, policy: CapabilityPolicy) -> Self
pub fn with_network_policy(self, policy: CapabilityPolicy) -> Self
Sets the three-state network policy (deny, ask, or allow).
Sourcepub fn with_network_requests_allowed(self, allowed: bool) -> Self
pub fn with_network_requests_allowed(self, allowed: bool) -> Self
Sets whether network capability requests can proceed to review.
Defaults to true (Ask) without preauthorizing access. False (Deny)
rejects requests during validation and materialization, including direct
runner creation.
Sourcepub fn with_denied_host_integrations(
self,
denied: impl IntoIterator<Item = HostIntegration>,
) -> Self
pub fn with_denied_host_integrations( self, denied: impl IntoIterator<Item = HostIntegration>, ) -> Self
Sets host integrations hard-denied (deny) by configuration.
Sourcepub fn with_session_permissions(
self,
permissions: ProcessSessionPermissions,
) -> SessionPermissionedProcessRunnerFactory<Self>
pub fn with_session_permissions( self, permissions: ProcessSessionPermissions, ) -> SessionPermissionedProcessRunnerFactory<Self>
Attaches a read-only capability view and returns the runtime-owned retention decorator. Configure backend-specific options before attaching it.
Trait Implementations§
Source§impl PermissionedProcessRunnerFactory for WorkspaceProcessRunnerFactory
impl PermissionedProcessRunnerFactory for WorkspaceProcessRunnerFactory
Source§fn validate_request(
&self,
request: &PermissionRequest,
) -> Result<(), ProcessRunnerError>
fn validate_request( &self, request: &PermissionRequest, ) -> Result<(), ProcessRunnerError>
Source§fn request_capabilities_are_satisfied(
&self,
request: &PermissionRequest,
) -> Result<bool, ProcessRunnerError>
fn request_capabilities_are_satisfied( &self, request: &PermissionRequest, ) -> Result<bool, ProcessRunnerError>
Source§fn targets_protected_metadata(&self, request: &PermissionRequest) -> bool
fn targets_protected_metadata(&self, request: &PermissionRequest) -> bool
providers/, MERRY_API_KEY_FILE, or a ProductReadOnly
write target), so runtime keeps approval single-action (Once) and
defaults interactive review UIs to Deny.Source§fn runner_for(&self, request: &PermissionRequest) -> Arc<dyn ProcessRunner> ⓘ
fn runner_for(&self, request: &PermissionRequest) -> Arc<dyn ProcessRunner> ⓘ
Source§fn prepare_approved_request(
&self,
request: &PermissionRequest,
) -> Result<PreparedProcessPermission, ProcessRunnerError>
fn prepare_approved_request( &self, request: &PermissionRequest, ) -> Result<PreparedProcessPermission, ProcessRunnerError>
Source§fn runner_for_decision(
&self,
request: &PermissionRequest,
_scope: ApprovalScope,
) -> Arc<dyn ProcessRunner> ⓘ
fn runner_for_decision( &self, request: &PermissionRequest, _scope: ApprovalScope, ) -> Arc<dyn ProcessRunner> ⓘ
merry_core::ApprovalScope. Read more