pub struct ToolDiscoveryIndex { /* private fields */ }Expand description
Discovery tool discovery index request or result value. Creating the value does not register tools; discovery executors document catalog and package-bundle effects.
Implementations§
Source§impl ToolDiscoveryIndex
impl ToolDiscoveryIndex
Sourcepub fn new() -> Self
pub fn new() -> Self
Creates a new discovery::index value with explicit caller-provided inputs. This constructor is data-only and performs no I/O or external side effects.
Sourcepub fn insert(&mut self, snapshot: ToolPackSnapshot)
pub fn insert(&mut self, snapshot: ToolPackSnapshot)
Adds data to this in-memory discovery::index collection. It does not perform external I/O, execute tools, or append journals.
Sourcepub fn search(&self, query: &str) -> Vec<ToolDiscoveryCandidate>
pub fn search(&self, query: &str) -> Vec<ToolDiscoveryCandidate>
Searches the in-memory discovery index for pack IDs or tool names that contain the query string. This is read-only and does not activate the returned candidates.
Sourcepub fn activation_delta(
&self,
pack_id: &str,
package: &RuntimePackage,
requested_by: SourceRef,
activation_policy_ref: PolicyRef,
) -> Result<PackageDelta, AgentError>
pub fn activation_delta( &self, pack_id: &str, package: &RuntimePackage, requested_by: SourceRef, activation_policy_ref: PolicyRef, ) -> Result<PackageDelta, AgentError>
Builds the package delta needed to activate one discovered candidate.
The active runtime package is not mutated until the caller applies the
returned delta through RuntimePackage::apply_delta.
Trait Implementations§
Source§impl Clone for ToolDiscoveryIndex
impl Clone for ToolDiscoveryIndex
Source§fn clone(&self) -> ToolDiscoveryIndex
fn clone(&self) -> ToolDiscoveryIndex
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more