pub struct ToolPackBuilder { /* private fields */ }Expand description
Builder for a toolkit pack assembled from ergonomic Tool and
AsyncTool declarations. Registering declarations with listen is
data-only; execution still requires a core runtime and executor registry.
Implementations§
Source§impl ToolPackBuilder
impl ToolPackBuilder
Sourcepub fn new(
pack_id: ToolPackId,
kind: ToolPackKind,
version: impl Into<String>,
source: SourceRef,
) -> Self
pub fn new( pack_id: ToolPackId, kind: ToolPackKind, version: impl Into<String>, source: SourceRef, ) -> Self
Creates a data-only toolkit pack builder.
Sourcepub fn trust(self, trust: TrustClass) -> Self
pub fn trust(self, trust: TrustClass) -> Self
Sets the trust class for the generated tool-pack snapshot.
Sourcepub fn listen(self, tool: Tool) -> Self
pub fn listen(self, tool: Tool) -> Self
Listens to a synchronous tool declaration by adding it to the generated tool-pack snapshot. This does not start an executor.
Sourcepub fn listen_async(self, tool: AsyncTool) -> Self
pub fn listen_async(self, tool: AsyncTool) -> Self
Listens to an async tool declaration by adding it to the generated tool-pack snapshot. This does not start a task or runtime.
Sourcepub fn build(self) -> Result<ToolkitPackBundle, AgentError>
pub fn build(self) -> Result<ToolkitPackBundle, AgentError>
Builds the toolkit pack bundle that core can install into a
RuntimePackageBuilder.
Trait Implementations§
Source§impl Clone for ToolPackBuilder
impl Clone for ToolPackBuilder
Source§fn clone(&self) -> ToolPackBuilder
fn clone(&self) -> ToolPackBuilder
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 Freeze for ToolPackBuilder
impl RefUnwindSafe for ToolPackBuilder
impl Send for ToolPackBuilder
impl Sync for ToolPackBuilder
impl Unpin for ToolPackBuilder
impl UnsafeUnpin for ToolPackBuilder
impl UnwindSafe for ToolPackBuilder
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