pub struct ProviderToolSpec {
pub name: String,
pub capability_id: CapabilityId,
pub namespace: CapabilityNamespace,
pub description: Option<String>,
pub schema_ref: PackageSidecarRef,
pub policy_refs: Vec<PolicyRef>,
pub redacted_schema: Option<Value>,
}Expand description
Provider-visible tool declaration projected from runtime-package state.
This DTO is safe for provider adapters because it carries only stable names, refs, policy identifiers, and optional redacted schema bodies. Raw tool arguments and executable handles never appear here.
Fields§
§name: StringProvider-visible canonical function/tool name.
capability_id: CapabilityIdStable capability id that owns this provider-visible declaration.
namespace: CapabilityNamespaceCapability namespace carried for lineage and collision debugging.
description: Option<String>Bounded provider-visible tool description from the runtime package.
This is projection metadata only. It does not affect tool execution, approval, policy, or runtime-package identity.
schema_ref: PackageSidecarRefTool input schema ref. Resolving it is separate from constructing a provider request.
policy_refs: Vec<PolicyRef>Policy refs that must still be evaluated by core before execution.
redacted_schema: Option<Value>Redacted inline schema body, when a package helper has made one safe for provider projection. Adapters must use a bounded fallback when absent.
Implementations§
Source§impl ProviderToolSpec
impl ProviderToolSpec
Sourcepub fn new(
name: impl Into<String>,
capability_id: CapabilityId,
namespace: CapabilityNamespace,
schema_ref: PackageSidecarRef,
policy_refs: Vec<PolicyRef>,
) -> Self
pub fn new( name: impl Into<String>, capability_id: CapabilityId, namespace: CapabilityNamespace, schema_ref: PackageSidecarRef, policy_refs: Vec<PolicyRef>, ) -> Self
Builds a provider tool declaration from package and runtime routing data. This is projection only and performs no provider call or tool execution.
Sourcepub fn with_description(self, description: impl Into<String>) -> Self
pub fn with_description(self, description: impl Into<String>) -> Self
Returns this declaration with a provider-visible description attached.
Sourcepub fn with_redacted_schema(self, schema: Value) -> Self
pub fn with_redacted_schema(self, schema: Value) -> Self
Returns this declaration with an inline redacted schema attached. The caller is responsible for supplying only provider-safe schema data.
Sourcepub fn provider_schema(&self) -> Value
pub fn provider_schema(&self) -> Value
Returns a provider-safe JSON schema body. If no inline schema body is present, the fallback is an object schema with SDK schema-ref metadata.
Trait Implementations§
Source§impl Clone for ProviderToolSpec
impl Clone for ProviderToolSpec
Source§fn clone(&self) -> ProviderToolSpec
fn clone(&self) -> ProviderToolSpec
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for ProviderToolSpec
impl Debug for ProviderToolSpec
Source§impl<'de> Deserialize<'de> for ProviderToolSpec
impl<'de> Deserialize<'de> for ProviderToolSpec
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>,
impl Eq for ProviderToolSpec
Source§impl PartialEq for ProviderToolSpec
impl PartialEq for ProviderToolSpec
Source§fn eq(&self, other: &ProviderToolSpec) -> bool
fn eq(&self, other: &ProviderToolSpec) -> bool
self and other values to be equal, and is used by ==.