pub trait InputStreamingTool:
Send
+ Sync
+ 'static {
// Required methods
fn name(&self) -> &str;
fn description(&self) -> &str;
fn parameters(&self) -> Option<Value>;
fn run<'life0, 'async_trait>(
&'life0 self,
args: Value,
input_rx: Receiver<InputEvent>,
yield_tx: Sender<Value>,
) -> Pin<Box<dyn Future<Output = Result<(), ToolError>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
}Expand description
An input-streaming tool — receives duplicated live input while running.
Required Methods§
Sourcefn description(&self) -> &str
fn description(&self) -> &str
Human-readable description of what this tool does.
Sourcefn parameters(&self) -> Option<Value>
fn parameters(&self) -> Option<Value>
JSON Schema for the tool’s input parameters, or None if parameterless.
Sourcefn run<'life0, 'async_trait>(
&'life0 self,
args: Value,
input_rx: Receiver<InputEvent>,
yield_tx: Sender<Value>,
) -> Pin<Box<dyn Future<Output = Result<(), ToolError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn run<'life0, 'async_trait>(
&'life0 self,
args: Value,
input_rx: Receiver<InputEvent>,
yield_tx: Sender<Value>,
) -> Pin<Box<dyn Future<Output = Result<(), ToolError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Execute the tool, receiving live input via input_rx and sending results via yield_tx.