pub struct ToolSearchCatalog {
pub items: Vec<ToolCatalogItem>,
}Expand description
Deterministic, redacted, size-bounded tool catalog for one turn.
Fields§
§items: Vec<ToolCatalogItem>Implementations§
Source§impl ToolSearchCatalog
impl ToolSearchCatalog
Sourcepub fn build(tools: &[ToolSpec], config: &ToolSearchConfig) -> Self
pub fn build(tools: &[ToolSpec], config: &ToolSearchConfig) -> Self
Builds the catalog from the turn’s tool specs: deterministic
name-ordering, stable ids with duplicate-name handling, source
filtering per config, max_catalog_items limiting, and redaction of
credential-like values, internal-only fields, and oversized schemas.
Sourcepub fn resolve(&self, id_or_name: &str) -> Option<&ToolCatalogItem>
pub fn resolve(&self, id_or_name: &str) -> Option<&ToolCatalogItem>
Resolves a catalog id (or bare tool name) back to the canonical
tool name for execution through TurnToolExecutor.
Trait Implementations§
Source§impl Clone for ToolSearchCatalog
impl Clone for ToolSearchCatalog
Source§fn clone(&self) -> ToolSearchCatalog
fn clone(&self) -> ToolSearchCatalog
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 moreSource§impl Debug for ToolSearchCatalog
impl Debug for ToolSearchCatalog
Source§impl<'de> Deserialize<'de> for ToolSearchCatalog
impl<'de> Deserialize<'de> for ToolSearchCatalog
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl PartialEq for ToolSearchCatalog
impl PartialEq for ToolSearchCatalog
Source§fn eq(&self, other: &ToolSearchCatalog) -> bool
fn eq(&self, other: &ToolSearchCatalog) -> bool
Tests for
self and other values to be equal, and is used by ==.Source§impl Serialize for ToolSearchCatalog
impl Serialize for ToolSearchCatalog
impl StructuralPartialEq for ToolSearchCatalog
Auto Trait Implementations§
impl Freeze for ToolSearchCatalog
impl RefUnwindSafe for ToolSearchCatalog
impl Send for ToolSearchCatalog
impl Sync for ToolSearchCatalog
impl Unpin for ToolSearchCatalog
impl UnsafeUnpin for ToolSearchCatalog
impl UnwindSafe for ToolSearchCatalog
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