pub struct InvocationRuntime { /* private fields */ }Expand description
Governed capabilities available to a tool during an agent/session invocation.
Custom meta-tools should use this facade for nested tools and model calls. It preserves the caller’s permission, HITL, hook, budget, timeout, queue, cancellation, and sanitization scope, and cannot manufacture the trusted host-direct origin.
Implementations§
Source§impl InvocationRuntime
impl InvocationRuntime
Sourcepub async fn invoke_tool(
&self,
name: impl Into<String>,
args: Value,
) -> Result<ToolResult>
pub async fn invoke_tool( &self, name: impl Into<String>, args: Value, ) -> Result<ToolResult>
Invoke another registered tool inside the current governance scope.
Sourcepub fn available_tools(&self) -> Vec<String>
pub fn available_tools(&self) -> Vec<String>
Return tool names visible through the current invocation gateway.
Sourcepub async fn complete(
&self,
messages: &[Message],
system: Option<&str>,
tools: &[ToolDefinition],
) -> Result<LlmResponse>
pub async fn complete( &self, messages: &[Message], system: Option<&str>, tools: &[ToolDefinition], ) -> Result<LlmResponse>
Make a governed model sub-call using the current budget and cancellation scope.
Trait Implementations§
Source§impl Clone for InvocationRuntime
impl Clone for InvocationRuntime
Source§fn clone(&self) -> InvocationRuntime
fn clone(&self) -> InvocationRuntime
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 InvocationRuntime
impl !UnwindSafe for InvocationRuntime
impl Freeze for InvocationRuntime
impl Send for InvocationRuntime
impl Sync for InvocationRuntime
impl Unpin for InvocationRuntime
impl UnsafeUnpin for InvocationRuntime
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> FutureExt for T
impl<T> FutureExt for T
Source§fn with_context(self, otel_cx: Context) -> WithContext<Self>
fn with_context(self, otel_cx: Context) -> WithContext<Self>
Source§fn with_current_context(self) -> WithContext<Self>
fn with_current_context(self) -> WithContext<Self>
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