pub struct PendingApproval {
pub id: String,
pub name: String,
pub args_json: String,
pub title: String,
}Expand description
One tool call awaiting human-in-the-loop approval.
Emitted by run_turn when ToolExecutor::needs_approval returns
true for a tool the model wants to call. The caller surfaces these to
the human / approver, persists an approval_request event per entry, and
re-drives the loop once a matching approval_response event lands.
id matches the provider’s tool-call id (so the assistant’s tool-use
content block lines up with the eventual tool-result), and is also used as
the request_id on the wire approval_request event payload.
Fields§
§id: StringProvider-assigned tool-call id; also used as the approval request_id.
name: StringTool name, as advertised by ToolExecutor::specs. Raw machine
identifier; the field of record for trust/audit (unchanged in the
event log).
args_json: StringArguments as a JSON string (opaque at this layer).
title: StringHuman display label (MCP-style title) for the tool, carried from the
harness wire for presentation in the approval prompt. May be empty when
the harness produced no label; renderers derive one from
name then.
Trait Implementations§
Source§impl Clone for PendingApproval
impl Clone for PendingApproval
Source§fn clone(&self) -> PendingApproval
fn clone(&self) -> PendingApproval
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more