pub struct ToolAuthorizationRequest {
pub agent_id: String,
pub agent_name: String,
pub model: String,
pub history_len: usize,
pub tool_call_id: String,
pub tool_name: String,
pub preview: ToolAuthorizationPreview,
}Expand description
Everything writing a ToolAuthorizer of one’s own makes a caller name.
The same rule as ToolSideEffectLevel above, applied to the seam
PreparedRun::with_tool_authorizer
opened: a host that installs an authorizer on a live session has to spell
the trait, the request it is handed, the decision it returns and the error
it may return instead, and none of those should cost it a mentra dependency
of its own — pinned to whatever version basis happens to resolve.
These stay in this module rather than joining ApprovalGate at the crate
root. RuntimeError is mentra’s runtime error and cannot sit unqualified
beside basis’s own RunError without the two reading as
a pair, and the five are only meaningful together — an authorizer names all
of them or none.
Fields§
§agent_id: String§agent_name: String§model: String§history_len: usize§tool_call_id: String§tool_name: String§preview: ToolAuthorizationPreviewTrait Implementations§
Source§impl Clone for ToolAuthorizationRequest
impl Clone for ToolAuthorizationRequest
Source§fn clone(&self) -> ToolAuthorizationRequest
fn clone(&self) -> ToolAuthorizationRequest
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 ToolAuthorizationRequest
impl Debug for ToolAuthorizationRequest
Source§impl<'de> Deserialize<'de> for ToolAuthorizationRequest
impl<'de> Deserialize<'de> for ToolAuthorizationRequest
Source§fn deserialize<__D>(
__deserializer: __D,
) -> Result<ToolAuthorizationRequest, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(
__deserializer: __D,
) -> Result<ToolAuthorizationRequest, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
impl Eq for ToolAuthorizationRequest
Source§impl PartialEq for ToolAuthorizationRequest
impl PartialEq for ToolAuthorizationRequest
Source§impl Serialize for ToolAuthorizationRequest
impl Serialize for ToolAuthorizationRequest
Source§fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
Serialize this value into the given Serde serializer. Read more
impl StructuralPartialEq for ToolAuthorizationRequest
Auto Trait Implementations§
impl Freeze for ToolAuthorizationRequest
impl RefUnwindSafe for ToolAuthorizationRequest
impl Send for ToolAuthorizationRequest
impl Sync for ToolAuthorizationRequest
impl Unpin for ToolAuthorizationRequest
impl UnsafeUnpin for ToolAuthorizationRequest
impl UnwindSafe for ToolAuthorizationRequest
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