pub struct ModelToolCallProposal { /* private fields */ }Expand description
A complete, unapproved tool-call proposal emitted by a model.
This value intentionally has no crate::InvocationId. Before assigning
one, the runtime resolves the exact descriptor from the tenant registry,
validates arguments against its digest-pinned schema, and applies policy,
budget, approval, and ledger checks. The provider call identifier is only a
correlation value; when absent, attempt ID plus ordered output index is the
durable proposal identity.
Implementations§
Source§impl ModelToolCallProposal
impl ModelToolCallProposal
Sourcepub fn new(
tool: CapabilityIdentity,
provider_call_id: Option<ModelProviderToolCallId>,
arguments: BoundedJson,
extensions: Extensions,
) -> Result<Self, ModelToolCallProposalError>
pub fn new( tool: CapabilityIdentity, provider_call_id: Option<ModelProviderToolCallId>, arguments: BoundedJson, extensions: Extensions, ) -> Result<Self, ModelToolCallProposalError>
Constructs a structurally valid, unapproved proposal.
§Errors
Returns ModelToolCallProposalError unless arguments are a JSON
object. This constructor does not perform tool-schema validation.
Sourcepub const fn tool(&self) -> &CapabilityIdentity
pub const fn tool(&self) -> &CapabilityIdentity
Returns the exact requested tool identity claimed by the model adapter.
Sourcepub const fn provider_call_id(&self) -> Option<&ModelProviderToolCallId>
pub const fn provider_call_id(&self) -> Option<&ModelProviderToolCallId>
Returns the optional opaque provider correlation identifier.
Sourcepub const fn arguments(&self) -> &BoundedJson
pub const fn arguments(&self) -> &BoundedJson
Returns bounded, untrusted JSON object arguments.
Sourcepub const fn extensions(&self) -> &Extensions
pub const fn extensions(&self) -> &Extensions
Returns registered opaque provider/adapter extension data.
Trait Implementations§
Source§impl Clone for ModelToolCallProposal
impl Clone for ModelToolCallProposal
Source§impl Debug for ModelToolCallProposal
impl Debug for ModelToolCallProposal
Source§impl<'de> Deserialize<'de> for ModelToolCallProposal
impl<'de> Deserialize<'de> for ModelToolCallProposal
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 ModelToolCallProposal
Source§impl JsonSchema for ModelToolCallProposal
impl JsonSchema for ModelToolCallProposal
Source§fn schema_id() -> Cow<'static, str>
fn schema_id() -> Cow<'static, str>
Source§fn json_schema(generator: &mut SchemaGenerator) -> Schema
fn json_schema(generator: &mut SchemaGenerator) -> Schema
Source§fn inline_schema() -> bool
fn inline_schema() -> bool
$ref keyword. Read more