pub struct BoundTools<'a> { /* private fields */ }Expand description
One invocation’s fixed descriptions, concrete targets, and parent control.
The binding borrows the executor configuration without holding locks. It cannot be cloned, and processing consumes it. It does not prevent a caller from creating a new binding or independently replaying a declaration.
Implementations§
Source§impl BoundTools<'_>
impl BoundTools<'_>
Sourcepub fn surface(&self) -> &ToolSurface
pub fn surface(&self) -> &ToolSurface
Borrows the ordered, immutable model-facing catalog fixed by this bind.
Sourcepub fn tools(&self) -> &[ToolDescription]
pub fn tools(&self) -> &[ToolDescription]
Borrows the ordered, immutable bound tool descriptions (definitions and metadata) fixed by this bind.
Sourcepub fn with_processor_data(self, data: ProcessorData) -> Self
pub fn with_processor_data(self, data: ProcessorData) -> Self
Hands data to every processor of this binding’s batch through
causa_kernel::ProcessorContext::data. The runner sets it from
crate::TurnRunOptions::processor_data; a caller that binds and
processes on its own sets it here.
Source§impl BoundTools<'_>
impl BoundTools<'_>
Sourcepub async fn process(
self,
batch: &mut ToolBatch,
) -> Result<(), ToolProcessingError>
pub async fn process( self, batch: &mut ToolBatch, ) -> Result<(), ToolProcessingError>
Processes a new, entirely pending batch using only this binding’s fixed targets. The caller retains the batch on every return path.
On controlled interruption, accepted results remain, started calls with
no accepted result become unknown, and unstarted calls remain pending.
A stop first seen after the last after-processor finished is not an
interruption of this call: the batch is complete and Ok is returned.
Ordinary failed, rejected, or unknown results do not make this method
fail. It does not commit material or cancel the caller’s parent token.