Expand description
P5-4: the data shapes carried across the thread boundary between an
interactive-handler call (blocked on a background/agent thread) and the
render/event-loop’s main thread — deliberately just data + a reply
channel, no trait impls, so crate::tui::state (the pure view-model)
and crate::tui::handlers (the actual PermissionsApprovalHandler/
McpElicitationHandler implementations) can both depend on this module
without a circular dependency between them.
Structs§
- Pending
Approval Request - One
Ask-tier request from the TOP-LEVEL agent’s own permissions gate (P5-1’scrate::permissions::PermissionsApprovalHandler::ask), waiting onSelf::reply_txfor the TUI’s decision.askblocks the calling thread on the pairedReceiveruntil a reply arrives (or the sending end is dropped — seecrate::tui::handlers::TuiApprovalHandler’s doc comment for why that’s still fail-closed). - Pending
Child Approval - The child-spawn analog of
PendingApprovalRequest(P5-3 §2.2 C6, closed bycrate::tui::handlers::TuiChildApprovalHandler): additionally carries which BACKGROUND CHILD raised the request, since a parent may have several background children in flight at once. - Pending
Elicitation - One server→client
elicitation/createrequest (crate::mcp::ElicitationRequest), waiting onSelf::reply_txfor the user’s answer. Uses atokio::sync::oneshot(notstd::sync::mpsclike the two structs above) becausecrate::mcp::McpElicitationHandler::handleis an ASYNC trait method — it.awaits the reply rather than blocking a thread. - PendingO
Auth Display - The OAuth device-code flow’s ONE-TIME display push (P5-2’s
run_device_flow’son_promptcallback) — informational only, no reply: the device flow polls the token endpoint regardless of whether the user has acknowledged seeing this, so there is nothing to block on.