pub struct ApprovalGate { /* private fields */ }Expand description
An approval-gated tool, as a graph node.
The command to perform is read from state.output (the agent loop wrote the
intended action there); the decision arrives via the resume-injected
INTERRUPT_RESUME_KEY. actions runs the tool with a JSON string argument
and returns the observation text — representing the side effect that must
only happen once, on the approved pass.
Implementations§
Trait Implementations§
Source§impl GraphNode<AgentState> for ApprovalGate
impl GraphNode<AgentState> for ApprovalGate
Source§fn execute<'life0, 'life1, 'async_trait>(
&'life0 self,
state: &'life1 AgentState,
config: Option<NodeConfig>,
) -> Pin<Box<dyn Future<Output = NodeResult<AgentState>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn execute<'life0, 'life1, 'async_trait>(
&'life0 self,
state: &'life1 AgentState,
config: Option<NodeConfig>,
) -> Pin<Box<dyn Future<Output = NodeResult<AgentState>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Execute the node Read more
Auto Trait Implementations§
impl !RefUnwindSafe for ApprovalGate
impl !UnwindSafe for ApprovalGate
impl Freeze for ApprovalGate
impl Send for ApprovalGate
impl Sync for ApprovalGate
impl Unpin for ApprovalGate
impl UnsafeUnpin for ApprovalGate
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