pub struct WsToolExecutor {
pub channel: Arc<WsChannel>,
/* private fields */
}Expand description
Tool executor that sends callbacks to the client over WebSocket.
Fields§
§channel: Arc<WsChannel>Implementations§
Trait Implementations§
Source§impl ToolExecutor for WsToolExecutor
impl ToolExecutor for WsToolExecutor
fn execute<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
tool: &'life1 str,
params: &'life2 Value,
) -> Pin<Box<dyn Future<Output = Result<Value, String>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Source§fn execute_with_action<'life0, 'life1, 'life2, 'life3, 'async_trait>(
&'life0 self,
tool: &'life1 str,
params: &'life2 Value,
action_id: &'life3 str,
timeout_ms: Option<u64>,
) -> Pin<Box<dyn Future<Output = Result<Value, String>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
fn execute_with_action<'life0, 'life1, 'life2, 'life3, 'async_trait>(
&'life0 self,
tool: &'life1 str,
params: &'life2 Value,
action_id: &'life3 str,
timeout_ms: Option<u64>,
) -> Pin<Box<dyn Future<Output = Result<Value, String>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
Source§fn execute_with_action_in_session<'life0, 'life1, 'life2, 'life3, 'life4, 'async_trait>(
&'life0 self,
tool: &'life1 str,
params: &'life2 Value,
action_id: &'life3 str,
timeout_ms: Option<u64>,
session_id: Option<&'life4 str>,
attempt: u32,
) -> Pin<Box<dyn Future<Output = Result<Value, String>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
'life4: 'async_trait,
fn execute_with_action_in_session<'life0, 'life1, 'life2, 'life3, 'life4, 'async_trait>(
&'life0 self,
tool: &'life1 str,
params: &'life2 Value,
action_id: &'life3 str,
timeout_ms: Option<u64>,
session_id: Option<&'life4 str>,
attempt: u32,
) -> Pin<Box<dyn Future<Output = Result<Value, String>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
'life4: 'async_trait,
Variant that also carries the Runtime execution session and the retry
attempt. Executors that retain safety-relevant state across calls (such
as a read-before-edit ledger) override this to keep that state isolated
by session. Existing executors retain their current behavior through the
default delegation. Read more
Source§fn execute_with_action_state_in_session<'life0, 'life1, 'life2, 'life3, 'life4, 'life5, 'life6, 'async_trait>(
&'life0 self,
tool: &'life1 str,
params: &'life2 Value,
action_id: &'life3 str,
timeout_ms: Option<u64>,
session_id: Option<&'life4 str>,
attempt: u32,
expected_effects: &'life5 HashMap<String, Value>,
return_schema: Option<&'life6 Value>,
) -> Pin<Box<dyn Future<Output = Result<ToolExecution, String>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
'life4: 'async_trait,
'life5: 'async_trait,
'life6: 'async_trait,
fn execute_with_action_state_in_session<'life0, 'life1, 'life2, 'life3, 'life4, 'life5, 'life6, 'async_trait>(
&'life0 self,
tool: &'life1 str,
params: &'life2 Value,
action_id: &'life3 str,
timeout_ms: Option<u64>,
session_id: Option<&'life4 str>,
attempt: u32,
expected_effects: &'life5 HashMap<String, Value>,
return_schema: Option<&'life6 Value>,
) -> Pin<Box<dyn Future<Output = Result<ToolExecution, String>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
'life4: 'async_trait,
'life5: 'async_trait,
'life6: 'async_trait,
Execute one action while allowing a transport to return runtime-observed
state mutations alongside its ordinary tool output. Read more
Source§fn execute_classified<'life0, 'life1, 'life2, 'life3, 'life4, 'life5, 'life6, 'async_trait>(
&'life0 self,
tool: &'life1 str,
params: &'life2 Value,
action_id: &'life3 str,
timeout_ms: Option<u64>,
session_id: Option<&'life4 str>,
attempt: u32,
expected_effects: &'life5 HashMap<String, Value>,
return_schema: Option<&'life6 Value>,
) -> Pin<Box<dyn Future<Output = Result<ToolExecution, ToolFailure>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
'life4: 'async_trait,
'life5: 'async_trait,
'life6: 'async_trait,
fn execute_classified<'life0, 'life1, 'life2, 'life3, 'life4, 'life5, 'life6, 'async_trait>(
&'life0 self,
tool: &'life1 str,
params: &'life2 Value,
action_id: &'life3 str,
timeout_ms: Option<u64>,
session_id: Option<&'life4 str>,
attempt: u32,
expected_effects: &'life5 HashMap<String, Value>,
return_schema: Option<&'life6 Value>,
) -> Pin<Box<dyn Future<Output = Result<ToolExecution, ToolFailure>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
'life4: 'async_trait,
'life5: 'async_trait,
'life6: 'async_trait,
Execute one action with typed failure evidence. Read more
Source§fn execute_stream<'life0, 'life1, 'life2, 'life3, 'async_trait>(
&'life0 self,
tool: &'life1 str,
_params: &'life2 Value,
_action_id: &'life3 str,
) -> Pin<Box<dyn Future<Output = Result<Receiver<ToolStreamChunk>, String>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
Self: 'async_trait,
fn execute_stream<'life0, 'life1, 'life2, 'life3, 'async_trait>(
&'life0 self,
tool: &'life1 str,
_params: &'life2 Value,
_action_id: &'life3 str,
) -> Pin<Box<dyn Future<Output = Result<Receiver<ToolStreamChunk>, String>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
Self: 'async_trait,
Streaming entry point for detached invocation modes (C2). Start
the tool and return a channel of
car_ir::ToolStreamChunks; the
runtime drains it into the per-runtime handle registry while the
DAG proceeds. End the stream with a terminal chunk (done /
error); dropping the sender without one is reported as failure.
A cooperative executor should stop work when the receiver returned
here is dropped (that’s what cancellation looks like from its side). Read moreAuto Trait Implementations§
impl !RefUnwindSafe for WsToolExecutor
impl !UnwindSafe for WsToolExecutor
impl Freeze for WsToolExecutor
impl Send for WsToolExecutor
impl Sync for WsToolExecutor
impl Unpin for WsToolExecutor
impl UnsafeUnpin for WsToolExecutor
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
impl<S, T> Duplex<S> for Twhere
T: FromSample<S> + ToSample<S>,
impl<T> ErasedDestructor for Twhere
T: 'static,
Source§impl<S> FromSample<S> for S
impl<S> FromSample<S> for S
fn from_sample_(s: S) -> S
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