Skip to main content

PermissionRequestShell

Struct PermissionRequestShell 

Source
pub struct PermissionRequestShell {
Show 17 fields pub can_offer_session_approval: bool, pub commands: Vec<PermissionRequestShellCommand>, pub command_segments: Option<Vec<PermissionRequestShellCommandSegment>>, pub full_command_text: String, pub has_write_file_redirection: bool, pub intention: String, pub kind: PermissionRequestShellKind, pub managed_approval_required: Option<bool>, pub possible_paths: Vec<String>, pub possible_urls: Vec<PermissionRequestShellPossibleUrl>, pub request_sandbox_bypass: Option<bool>, pub request_sandbox_bypass_reason: Option<String>, pub request_sandbox_permissive: Option<bool>, pub resolved_paths: Option<HashMap<String, String>>, pub resolved_working_directory: Option<String>, pub tool_call_id: Option<String>, pub warning: Option<String>,
}
Expand description

Shell command permission request

Fields§

§can_offer_session_approval: bool

Whether the UI can offer session-wide approval for this command pattern

§commands: Vec<PermissionRequestShellCommand>

Parsed command identifiers found in the command text

§command_segments: Option<Vec<PermissionRequestShellCommandSegment>>

Parsed command segments, including arguments, used for managed policy matching

§full_command_text: String

The complete shell command text to be executed

§has_write_file_redirection: bool

Whether the command includes a file write redirection (e.g., > or >>)

§intention: String

Human-readable description of what the command intends to do

§kind: PermissionRequestShellKind

Permission kind discriminator

§managed_approval_required: Option<bool>

Whether managed policy requires a human response and forbids host auto-approval

§possible_paths: Vec<String>

File paths that may be read or written by the command

§possible_urls: Vec<PermissionRequestShellPossibleUrl>

URLs that may be accessed by the command

§request_sandbox_bypass: Option<bool>

True when the tool is asking to run this command outside the sandbox, either because the command detaches and cannot be sandboxed at all, or because a sandboxed run looked blocked (host opted in via sandbox.allowBypass). The model cannot ask for this; only the tool raises it. This is a request, not a grant: the command runs unsandboxed only if the user approves this permission request. Hosts should highlight the elevated risk in the approval UI.

§request_sandbox_bypass_reason: Option<String>

What the tool tells the user about the bypass on offer: which policy rule blocked the call, or why it cannot be sandboxed. Only meaningful when requestSandboxBypass is true.

§request_sandbox_permissive: Option<bool>

True when the requested escalation is a permissive retry rather than a full bypass: the command re-runs inside the sandbox with its file and process restrictions recording instead of blocking, while the network policy stays enforced. Always accompanied by requestSandboxBypass, so hosts that do not recognize this field still treat the request as the escalation it is. Hosts that do recognize it must not describe the command as running outside the sandbox, which would overstate the privilege being granted.

§resolved_paths: Option<HashMap<String, String>>

Runtime-resolved canonical object each possiblePaths entry names, keyed by the requested spelling, used for authorization identity checks. Internal and experimental; clients should continue to display possiblePaths.

Experimental. This type is part of an experimental wire-protocol surface and may change or be removed in future SDK or CLI releases.

§resolved_working_directory: Option<String>

Runtime-resolved canonical working directory the command runs in, used for authorization identity checks. Internal and experimental; clients should not display it.

Experimental. This type is part of an experimental wire-protocol surface and may change or be removed in future SDK or CLI releases.

§tool_call_id: Option<String>

Tool call ID that triggered this permission request

§warning: Option<String>

Optional warning message about risks of running this command

Trait Implementations§

Source§

impl Clone for PermissionRequestShell

Source§

fn clone(&self) -> PermissionRequestShell

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 PermissionRequestShell

Source§

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

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

impl Default for PermissionRequestShell

Source§

fn default() -> PermissionRequestShell

Returns the “default value” for a type. Read more
Source§

impl<'de> Deserialize<'de> for PermissionRequestShell

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 Serialize for PermissionRequestShell

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

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<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
where ST: ?Sized, DT: ?Sized,

Source§

impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
where ST: ?Sized, DT: ?Sized,

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> DynClone for T
where T: Clone,

Source§

fn __clone_box(&self, _: Private) -> *mut ()

Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T> Instrument for T

Source§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
Source§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
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> PolicyExt for T
where T: ?Sized,

Source§

fn and<P, B, E>(self, other: P) -> And<T, P>
where T: Sized + Policy<B, E>, P: Policy<B, E>,

Create a new Policy that returns Action::Follow only if self and other return Action::Follow. Read more
Source§

fn or<P, B, E>(self, other: P) -> Or<T, P>
where T: Sized + Policy<B, E>, P: Policy<B, E>,

Create a new Policy that returns Action::Follow if either self or other returns Action::Follow. Read more
Source§

impl<T> Read<Exclusive, BecauseExclusive> for T
where T: ?Sized,

Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
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.
Source§

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

Source§

fn vzip(self) -> V

Source§

impl<T> WithSubscriber for T

Source§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more