Struct Approval
pub struct Approval {
pub call_id: String,
pub tool: String,
pub question: String,
pub arguments: Value,
pub approved: bool,
}Expand description
A tool call a before_tool hook asked a person to approve (ADR 0050, decision 12, slice H8).
Stored in Conversation::approval beside the PendingQuestion the run parks on, which is
the question the person reads and answers through the path every question takes. While it is
not approved the run waits; a yes sets it, and the next call of the loop runs
the call in the journaled step tool:<call id>:approved with arguments,
exactly once; a no answers the call with the person’s words and clears it. The step that asked is
recorded, so the hooks are never asked again.
Fields§
§call_id: StringThe call that waits.
tool: StringIts tool.
question: StringWhat the hook asked, in its own words.
arguments: ValueThe arguments the call runs with when approved: the model’s, as the hooks before the ask
left them (the step tool:<call id> recorded them).
approved: boolThe person said yes: the call runs at the next turn of the loop.
Trait Implementations§
§impl<'de> Deserialize<'de> for Approval
impl<'de> Deserialize<'de> for Approval
§fn deserialize<__D>(
__deserializer: __D,
) -> Result<Approval, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(
__deserializer: __D,
) -> Result<Approval, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
§impl Serialize for Approval
impl Serialize for Approval
§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,
impl StructuralPartialEq for Approval
Auto Trait Implementations§
impl Freeze for Approval
impl RefUnwindSafe for Approval
impl Send for Approval
impl Sync for Approval
impl Unpin for Approval
impl UnsafeUnpin for Approval
impl UnwindSafe for Approval
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
T in a tonic::Request§impl<L> LayerExt<L> for L
impl<L> LayerExt<L> for L
§fn named_layer<S>(&self, service: S) -> Layered<<L as Layer<S>>::Service, S>where
L: Layer<S>,
fn named_layer<S>(&self, service: S) -> Layered<<L as Layer<S>>::Service, S>where
L: Layer<S>,
Layered].