#[non_exhaustive]pub struct ApprovalRequestParams {Show 19 fields
pub session_id: String,
pub approval_id: String,
pub turn_id: String,
pub task_id: String,
pub item_id: String,
pub tool_call_id: String,
pub tool_name: String,
pub raw_args: String,
pub view_cursor: String,
pub source_range: SourceRange,
pub subject: ApprovalSubject,
pub current_requirement_id: ApprovalRequirementRef,
pub available_choices: Vec<ApprovalChoice>,
pub protected_write: bool,
pub judge_escalated: bool,
pub reviewer_reason: Option<String>,
pub subagent_origin: Option<ApprovalSubagentOrigin>,
pub cua_card_facts: Option<ApprovalCuaCardFacts>,
pub node: Option<String>,
}Expand description
Full params shared by approval/request and approval/requested.
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.session_id: StringThe owning session. For a subagent’s approval shown on the parent, this is the parent session.
approval_id: StringThe approval’s stable id. Match approval/decide, approval/updated
and approval/resolved by it, never by the JSON-RPC request id, which
belongs to one connection.
turn_id: StringThe turn whose tool call is waiting on this approval.
task_id: StringThe id of the task running the tool call.
item_id: StringThe toolCall view item waiting on this approval.
tool_call_id: StringThe model provider’s id for this tool call.
tool_name: StringThe name of the tool being called.
raw_args: StringThe tool call’s arguments as a string, usually JSON. With toolName, it
lets a client show a subject whose kind it does not recognize.
view_cursor: StringThe cursor of the approval/requested event that opened this request.
A re-send for a later stage keeps this cursor, so view/page at it
returns the opening stage, which may be older than this payload.
source_range: SourceRangeThe stored records this event was folded from: an opaque token clients must not interpret.
subject: ApprovalSubjectWhat the approval is for. Show a kind you do not recognize
generically, and never auto-approve it.
current_requirement_id: ApprovalRequirementRefThe requirement the next decision must target; send it unchanged as
requirementId in approval/decide. For shell it names the first
stage still needing a decision; for other kinds its sourceIndex is 0.
available_choices: Vec<ApprovalChoice>The choices the server offers for the current requirement. Send the
chosen one’s choiceId in approval/decide; clients never build their
own.
protected_write: booltrue when this approval guards a write to a protected file. Only
allow-once and reject choices are offered, and a decision is accepted
only while at least one client is subscribed to the session.
judge_escalated: booltrue when the automated LLM judge saw this request first and handed it
to a person without deciding. A display hint only. The host sends it
as false when it re-issues the request after a restart or on
session/resume; a re-send for a later stage keeps it.
reviewer_reason: Option<String>The judge’s escalation reason as one bounded display line. Present only
on a request released by a valid structured escalate with a non-blank
judge rationale; absent on every other approval. A display hint only,
like judge_escalated: it never authorizes anything.
subagent_origin: Option<ApprovalSubagentOrigin>Present only for a child (native subagent) approval projected onto the parent session’s plane; parent-own approvals omit it.
cua_card_facts: Option<ApprovalCuaCardFacts>A Computer Use card’s facts: the page, the window and each step that may have an effect, in the host’s words; absent on every other approval.
node: Option<String>The name of the node the action would run on. Experimental
(approval/requested.node). Absent means the action would run on the
host’s own machine: every action in a session that never had a remote
node, and an action bound for the host’s own machine in a session that
has had one. Never local, and absence never means the default node.