Skip to main content

ApprovalRequestParams

Struct ApprovalRequestParams 

Source
#[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
Non-exhaustive structs could have additional fields added in future. Therefore, non-exhaustive structs cannot be constructed in external crates using the traditional Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.
§session_id: String

The owning session. For a subagent’s approval shown on the parent, this is the parent session.

§approval_id: String

The 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: String

The turn whose tool call is waiting on this approval.

§task_id: String

The id of the task running the tool call.

§item_id: String

The toolCall view item waiting on this approval.

§tool_call_id: String

The model provider’s id for this tool call.

§tool_name: String

The name of the tool being called.

§raw_args: String

The 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: String

The 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: SourceRange

The stored records this event was folded from: an opaque token clients must not interpret.

§subject: ApprovalSubject

What the approval is for. Show a kind you do not recognize generically, and never auto-approve it.

§current_requirement_id: ApprovalRequirementRef

The 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: bool

true 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: bool

true 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.

Trait Implementations§

Source§

impl Clone for ApprovalRequestParams

Source§

fn clone(&self) -> Self

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for ApprovalRequestParams

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl<'de> Deserialize<'de> for ApprovalRequestParams

Source§

fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>
where __D: Deserializer<'de>,

Deserialize this value from the given Serde deserializer. Read more
Source§

impl Eq for ApprovalRequestParams

Source§

impl PartialEq for ApprovalRequestParams

Source§

fn eq(&self, other: &Self) -> bool

Equality operator ==. Read more
1.0.0 (const: unstable) · Source§

fn ne(&self, other: &Rhs) -> bool

Inequality operator !=. Read more
Source§

impl Serialize for ApprovalRequestParams

Source§

fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>
where __S: Serializer,

Serialize this value into the given Serde serializer. Read more
Source§

impl StructuralPartialEq for ApprovalRequestParams

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> DeserializeOwned for T
where T: for<'de> Deserialize<'de>,

Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = !

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, !>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.