pub struct RuntimeControlHandle { /* private fields */ }Expand description
Host-only handle for live runtime safety controls.
Implementations§
Source§impl RuntimeControlHandle
impl RuntimeControlHandle
Sourcepub fn set_tool_security(&self, config: ToolSecurityConfig) -> u64
pub fn set_tool_security(&self, config: ToolSecurityConfig) -> u64
Overrides tool security for later tool calls and panics if host policy is invalid.
Sourcepub fn try_set_tool_security(
&self,
config: ToolSecurityConfig,
) -> Result<u64, AgentError>
pub fn try_set_tool_security( &self, config: ToolSecurityConfig, ) -> Result<u64, AgentError>
Validates replacement policy before changing the runtime-control generation or active snapshot.
Sourcepub fn clear_tool_security_override(&self) -> u64
pub fn clear_tool_security_override(&self) -> u64
Clears the live tool security override.
Sourcepub fn set_tool_scope(&self, tool_ids: Vec<String>) -> u64
pub fn set_tool_scope(&self, tool_ids: Vec<String>) -> u64
Narrows the runtime’s declared tool grant for later calls without adding authority.
Sourcepub fn clear_tool_scope_override(&self) -> u64
pub fn clear_tool_scope_override(&self) -> u64
Clears live narrowing so later calls return to the runtime’s declared grant.
Sourcepub fn set_emergency_deny(&self, enabled: bool) -> u64
pub fn set_emergency_deny(&self, enabled: bool) -> u64
Enables or disables emergency denial for future tool calls.
Sourcepub fn cancel_all(&self) -> u64
pub fn cancel_all(&self) -> u64
Denies future calls and asks active cancellable work to stop.
Trait Implementations§
Source§impl Clone for RuntimeControlHandle
impl Clone for RuntimeControlHandle
Source§fn clone(&self) -> RuntimeControlHandle
fn clone(&self) -> RuntimeControlHandle
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl !RefUnwindSafe for RuntimeControlHandle
impl !UnwindSafe for RuntimeControlHandle
impl Freeze for RuntimeControlHandle
impl Send for RuntimeControlHandle
impl Sync for RuntimeControlHandle
impl Unpin for RuntimeControlHandle
impl UnsafeUnpin for RuntimeControlHandle
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> Instrumented<Self> ⓘ
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more