pub struct TuiChildApprovalHandler { /* private fields */ }Expand description
P5-3’s answerable child-approval handler, closing the §2.2 C6 deferred
chain — see crate::agent::Agent::set_child_approval_handler_factory’s
doc comment for how this REPLACES (only when installed) the default
never-blocking crate::subagents::ParentQueueApprovalHandler. Also
records every request into the shared queue (the SAME
Agent::pending_child_approvals audit trail ParentQueueApprovalHandler
itself writes to), so crate::agent::Agent::pending_child_approvals
stays a complete audit log regardless of which handler answered a given
request.
Implementations§
Source§impl TuiChildApprovalHandler
impl TuiChildApprovalHandler
Sourcepub fn new(
child_agent_id: String,
queue: Arc<Mutex<Vec<QueuedApproval>>>,
tx: Sender<PendingChildApproval>,
) -> Self
pub fn new( child_agent_id: String, queue: Arc<Mutex<Vec<QueuedApproval>>>, tx: Sender<PendingChildApproval>, ) -> Self
Construct a per-child handler — see
TuiBridge::child_approval_handler_factory for the usual way one
of these gets built (one per spawn, via
crate::agent::Agent::set_child_approval_handler_factory).
Trait Implementations§
Source§impl PermissionsApprovalHandler for TuiChildApprovalHandler
impl PermissionsApprovalHandler for TuiChildApprovalHandler
Source§fn ask(&self, req: &ApprovalRequest<'_>) -> ApprovalOutcome
fn ask(&self, req: &ApprovalRequest<'_>) -> ApprovalOutcome
Render a decision for
req. Implementations that need to block on
user input (a real TUI prompt) do so here; a scripted/headless
implementation (tests, CI, an --auto-approve flag) returns
immediately.Auto Trait Implementations§
impl Freeze for TuiChildApprovalHandler
impl RefUnwindSafe for TuiChildApprovalHandler
impl Send for TuiChildApprovalHandler
impl Sync for TuiChildApprovalHandler
impl Unpin for TuiChildApprovalHandler
impl UnsafeUnpin for TuiChildApprovalHandler
impl UnwindSafe for TuiChildApprovalHandler
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