pub struct QueuedApproval {
pub child_agent_id: String,
pub tool: String,
pub subject: Option<String>,
pub queued_at_ms: i64,
pub outcome: Option<QueuedApprovalOutcome>,
}Expand description
A queued approval request from a background_prompts = "parent" child,
surfaced via Agent::pending_child_approvals (§2.2 C6 “parent-surfaced
queue”). This struct is ALWAYS a record for the parent to inspect/audit
(never a pending decision the parent’s answer changes retroactively) —
but what actually answers the underlying call depends on which
PermissionsApprovalHandler Agent::run_spawn_subagent installed for
the child:
- the DEFAULT
ParentQueueApprovalHandler(no TUI factory installed) resolves every request toDenyimmediately, THEN records it here — “queued” in name only, never actually blocking (P5-3’s shipped, never-blocking posture, unchanged). - P5-4’s
crate::tui::TuiChildApprovalHandler(installed viacrate::agent::Agent::set_child_approval_handler_factory) records the SAME entry here for audit purposes, but the underlying call genuinely BLOCKS until a TUI operator answers it — which may resolveAllow/AllowForSession, not onlyDeny. So: don’t assume every entry here was already denied — check the actual outcome the caller observed (or the handler installed for this session) before treating this queue as “purely historical, all denied.”
outcome is how that last warning is answered mechanically rather than by
inspection: every handler records the decision it actually returned, so a
reader (ORCH-9’s harness.v1.approvals.list) never has to guess whether
an entry is still waiting. None means the answer has not arrived yet.
Fields§
§child_agent_id: StringWhich child raised this request.
tool: StringThe tool it tried to call.
subject: Option<String>The canonicalized command/path subject, if any.
queued_at_ms: i64Unix-ms wall-clock time it was queued.
outcome: Option<QueuedApprovalOutcome>The decision the installed handler returned, once it has one.
Trait Implementations§
Source§impl Clone for QueuedApproval
impl Clone for QueuedApproval
Source§fn clone(&self) -> QueuedApproval
fn clone(&self) -> QueuedApproval
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more