pub struct AgentWorkspaceEnvironmentProfile { /* private fields */ }Expand description
Builder for common isolated agent workspace environments.
The builder is data-only. It lowers into core isolation DTOs and does not install runtimes, start containers, open sockets, resolve DNS, or configure host firewall state.
Implementations§
Source§impl AgentWorkspaceEnvironmentProfile
impl AgentWorkspaceEnvironmentProfile
Sourcepub fn new(environment_id: impl Into<String>) -> Self
pub fn new(environment_id: impl Into<String>) -> Self
Creates a profile with safe defaults: no network, no ambient secrets, snapshot workspace mounts when a workspace is supplied, and cleanup-required lifecycle.
Sourcepub fn isolation_class(self, isolation_class: IsolationClass) -> Self
pub fn isolation_class(self, isolation_class: IsolationClass) -> Self
Sets the minimum isolation class required for this environment.
Sourcepub fn prefer_runtime(self, runtime_ref: impl Into<IsolationRuntimeRef>) -> Self
pub fn prefer_runtime(self, runtime_ref: impl Into<IsolationRuntimeRef>) -> Self
Adds a preferred runtime adapter ref. Selection still requires a registered adapter capability report that satisfies the package policy.
Sourcepub fn runtime(self, runtime: EnvironmentRuntime) -> Self
pub fn runtime(self, runtime: EnvironmentRuntime) -> Self
Sets the minimum isolation class and preferred adapter from a known toolkit runtime.
This is a data-only shortcut for calling Self::isolation_class with
the runtime’s matching class and Self::prefer_runtime with its stable
core IsolationRuntimeRef. It does not register adapters, start
containers, open sockets, or relax host policy; runtime selection still
requires a host-provided adapter capability report during execution.
Sourcepub fn workspace(self, workspace_ref: impl Into<String>) -> Self
pub fn workspace(self, workspace_ref: impl Into<String>) -> Self
Mounts a workspace by alias using the default snapshot mode.
Sourcepub fn workspace_with_mode(
self,
workspace_ref: impl Into<String>,
mode: WorkspaceMountMode,
) -> Self
pub fn workspace_with_mode( self, workspace_ref: impl Into<String>, mode: WorkspaceMountMode, ) -> Self
Mounts a workspace by alias with an explicit core workspace mode.
Sourcepub fn no_network(self) -> Self
pub fn no_network(self) -> Self
Keeps the environment network disabled and requires a no-network guarantee.
Sourcepub fn egress_allowlist(self, allowlist: EgressAllowlist) -> Self
pub fn egress_allowlist(self, allowlist: EgressAllowlist) -> Self
Applies a deterministic egress allowlist and requires adapter support for it.
Sourcepub fn require_capability(self, capability: IsolationCapability) -> Self
pub fn require_capability(self, capability: IsolationCapability) -> Self
Adds a required isolation capability to the lowered requirement.
Sourcepub fn destination(self, destination: DestinationRef) -> Self
pub fn destination(self, destination: DestinationRef) -> Self
Sets the destination ref used for lineage.
Sourcepub fn build(self) -> Result<AgentWorkspaceEnvironment, AgentError>
pub fn build(self) -> Result<AgentWorkspaceEnvironment, AgentError>
Builds the canonical core environment plus toolkit metadata.
Trait Implementations§
Source§impl Clone for AgentWorkspaceEnvironmentProfile
impl Clone for AgentWorkspaceEnvironmentProfile
Source§fn clone(&self) -> AgentWorkspaceEnvironmentProfile
fn clone(&self) -> AgentWorkspaceEnvironmentProfile
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more