pub struct PermissionRequest {
pub request_id: String,
pub tool_name: String,
pub input: Value,
pub raw: Value,
}Expand description
A mid-turn permission prompt from the CLI for a single tool invocation.
Forwarded to the PermissionHandler registered via
DuplexOptions::on_permission. Capture
Self::request_id inside your handler if you intend to return
PermissionDecision::Defer and answer later via
DuplexSession::respond_to_permission.
Fields§
§request_id: StringCLI-assigned correlation id. Pass this to
DuplexSession::respond_to_permission when deferring.
tool_name: StringThe tool the model wants to use (e.g. "Bash", "Edit").
input: ValueThe tool’s input payload as the model produced it.
raw: ValueThe full request object as sent by the CLI, for fields not
promoted to typed accessors.
Trait Implementations§
Source§impl Clone for PermissionRequest
impl Clone for PermissionRequest
Source§fn clone(&self) -> PermissionRequest
fn clone(&self) -> PermissionRequest
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl Freeze for PermissionRequest
impl RefUnwindSafe for PermissionRequest
impl Send for PermissionRequest
impl Sync for PermissionRequest
impl Unpin for PermissionRequest
impl UnsafeUnpin for PermissionRequest
impl UnwindSafe for PermissionRequest
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more