pub struct ExecutionContext {
pub id: String,
pub name: String,
pub description: Option<String>,
pub inherits_from: Option<String>,
pub mounts: Vec<Mount>,
pub environment: EnvironmentConfig,
pub secrets: SecretsConfig,
pub resources: ResourceConfig,
pub runtime_overrides: Option<RuntimeOverrides>,
pub metadata: ContextMetadata,
}Expand description
A complete execution environment definition.
Execution contexts define everything needed to run a skill tool:
- File and directory mounts
- Environment variables
- Secrets and credentials
- Resource limits
- Runtime-specific overrides
Fields§
§id: StringUnique identifier for this context.
name: StringHuman-readable name.
description: Option<String>Optional description.
inherits_from: Option<String>Optional parent context to inherit from.
mounts: Vec<Mount>File and directory mounts.
environment: EnvironmentConfigEnvironment variable definitions.
secrets: SecretsConfigSecret references.
resources: ResourceConfigResource limits and capabilities.
runtime_overrides: Option<RuntimeOverrides>Runtime-specific overrides.
metadata: ContextMetadataMetadata.
Implementations§
Source§impl ExecutionContext
impl ExecutionContext
Sourcepub fn new(id: impl Into<String>, name: impl Into<String>) -> Self
pub fn new(id: impl Into<String>, name: impl Into<String>) -> Self
Create a new execution context with the given ID and name.
Sourcepub fn inheriting(
id: impl Into<String>,
name: impl Into<String>,
parent_id: impl Into<String>,
) -> Self
pub fn inheriting( id: impl Into<String>, name: impl Into<String>, parent_id: impl Into<String>, ) -> Self
Create a context that inherits from another context.
Sourcepub fn with_description(self, description: impl Into<String>) -> Self
pub fn with_description(self, description: impl Into<String>) -> Self
Set the description.
Sourcepub fn with_mount(self, mount: Mount) -> Self
pub fn with_mount(self, mount: Mount) -> Self
Add a mount.
Sourcepub fn with_environment(self, environment: EnvironmentConfig) -> Self
pub fn with_environment(self, environment: EnvironmentConfig) -> Self
Set environment configuration.
Sourcepub fn with_secrets(self, secrets: SecretsConfig) -> Self
pub fn with_secrets(self, secrets: SecretsConfig) -> Self
Set secrets configuration.
Sourcepub fn with_resources(self, resources: ResourceConfig) -> Self
pub fn with_resources(self, resources: ResourceConfig) -> Self
Set resource configuration.
Sourcepub fn with_runtime_overrides(self, overrides: RuntimeOverrides) -> Self
pub fn with_runtime_overrides(self, overrides: RuntimeOverrides) -> Self
Set runtime overrides.
Sourcepub fn has_parent(&self) -> bool
pub fn has_parent(&self) -> bool
Check if this context inherits from another.
Sourcepub fn required_secrets(&self) -> Vec<&str>
pub fn required_secrets(&self) -> Vec<&str>
Get all required secret keys.
Sourcepub fn required_mounts(&self) -> Vec<&Mount>
pub fn required_mounts(&self) -> Vec<&Mount>
Get all required mounts.
Trait Implementations§
Source§impl Clone for ExecutionContext
impl Clone for ExecutionContext
Source§fn clone(&self) -> ExecutionContext
fn clone(&self) -> ExecutionContext
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for ExecutionContext
impl Debug for ExecutionContext
Source§impl<'de> Deserialize<'de> for ExecutionContext
impl<'de> Deserialize<'de> for ExecutionContext
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>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
impl Freeze for ExecutionContext
impl RefUnwindSafe for ExecutionContext
impl Send for ExecutionContext
impl Sync for ExecutionContext
impl Unpin for ExecutionContext
impl UnwindSafe for ExecutionContext
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