pub enum EnvironmentRuntime {
LocalContainer,
LocalSandbox,
LocalLightweightVm,
RemoteSandbox,
LocalHostProcess,
}Expand description
Well-known toolkit runtime refs for common environment profiles.
These values are data-only aliases for IsolationRuntimeRef. Hosts and
optional runtime crates still own adapter registration and enforcement.
use agent_sdk_core::{IsolationClass, IsolationRuntimeRef};
use agent_sdk_toolkit::EnvironmentRuntime;
let runtime = EnvironmentRuntime::LocalContainer;
assert_eq!(runtime.as_str(), "runtime:local.container");
assert_eq!(runtime.isolation_class(), IsolationClass::Container);
let runtime_ref: IsolationRuntimeRef = runtime.into();
assert_eq!(runtime_ref.as_str(), "runtime:local.container");Variants§
LocalContainer
Local container adapter ref (runtime:local.container), requiring container isolation.
LocalSandbox
Local sandbox adapter ref (runtime:local.sandbox), requiring sandbox isolation.
LocalLightweightVm
Local lightweight VM adapter ref (runtime:local.lightweight_vm), requiring VM isolation.
RemoteSandbox
Remote sandbox adapter ref (runtime:remote.sandbox), requiring remote sandbox isolation.
LocalHostProcess
Explicit host-process adapter ref (runtime:local.host_process).
Hosts should use this only when policy allows host process execution.
Implementations§
Source§impl EnvironmentRuntime
impl EnvironmentRuntime
Sourcepub fn as_str(self) -> &'static str
pub fn as_str(self) -> &'static str
Returns the stable serialized runtime ref lowered into core isolation contracts.
Sourcepub fn isolation_class(self) -> IsolationClass
pub fn isolation_class(self) -> IsolationClass
Returns the matching minimum isolation class for this runtime ref.
The value is used by AgentWorkspaceEnvironmentProfile::runtime when it
builds a core isolation requirement. It is not an adapter capability
check by itself.
Sourcepub fn runtime_ref(self) -> IsolationRuntimeRef
pub fn runtime_ref(self) -> IsolationRuntimeRef
Returns the core runtime ref for this well-known runtime alias.
Constructing the ref is data-only. A host must still register a matching isolation adapter before execution can select it.
Trait Implementations§
Source§impl Clone for EnvironmentRuntime
impl Clone for EnvironmentRuntime
Source§fn clone(&self) -> EnvironmentRuntime
fn clone(&self) -> EnvironmentRuntime
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreimpl Copy for EnvironmentRuntime
Source§impl Debug for EnvironmentRuntime
impl Debug for EnvironmentRuntime
Source§impl<'de> Deserialize<'de> for EnvironmentRuntime
impl<'de> Deserialize<'de> for EnvironmentRuntime
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Source§impl Display for EnvironmentRuntime
impl Display for EnvironmentRuntime
impl Eq for EnvironmentRuntime
Source§impl From<EnvironmentRuntime> for IsolationRuntimeRef
impl From<EnvironmentRuntime> for IsolationRuntimeRef
Source§fn from(runtime: EnvironmentRuntime) -> Self
fn from(runtime: EnvironmentRuntime) -> Self
Source§impl Hash for EnvironmentRuntime
impl Hash for EnvironmentRuntime
Source§impl Ord for EnvironmentRuntime
impl Ord for EnvironmentRuntime
Source§fn cmp(&self, other: &EnvironmentRuntime) -> Ordering
fn cmp(&self, other: &EnvironmentRuntime) -> Ordering
1.21.0 (const: unstable) · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Source§impl PartialEq for EnvironmentRuntime
impl PartialEq for EnvironmentRuntime
Source§fn eq(&self, other: &EnvironmentRuntime) -> bool
fn eq(&self, other: &EnvironmentRuntime) -> bool
self and other values to be equal, and is used by ==.Source§impl PartialOrd for EnvironmentRuntime
impl PartialOrd for EnvironmentRuntime
Source§impl Serialize for EnvironmentRuntime
impl Serialize for EnvironmentRuntime
impl StructuralPartialEq for EnvironmentRuntime
Auto Trait Implementations§
impl Freeze for EnvironmentRuntime
impl RefUnwindSafe for EnvironmentRuntime
impl Send for EnvironmentRuntime
impl Sync for EnvironmentRuntime
impl Unpin for EnvironmentRuntime
impl UnsafeUnpin for EnvironmentRuntime
impl UnwindSafe for EnvironmentRuntime
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Comparable<K> for Q
impl<Q, K> Comparable<K> for Q
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.