Struct PermissionRequestPayload
#[non_exhaustive]pub struct PermissionRequestPayload {
pub session_id: SessionId,
pub tool_call: ToolCallUpdate,
pub options: Vec<PermissionOption>,
pub meta: Option<Map<String, Value>>,
}Expand description
Re-exported so the supervisor (AU‑4) can inspect the permission request +
build the response without depending on agent-client-protocol directly.
Request for user permission to execute a tool call.
Sent when the agent needs authorization before performing a sensitive operation.
See protocol docs: Requesting Permission
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: SessionIdThe session ID for this request.
tool_call: ToolCallUpdateDetails about the tool call requiring permission.
options: Vec<PermissionOption>Available permission options for the user to choose from.
meta: Option<Map<String, Value>>The _meta property is reserved by ACP to allow clients and agents to attach additional metadata to their interactions. Implementations MUST NOT make assumptions about values at these keys.
See protocol docs: Extensibility
Implementations§
§impl RequestPermissionRequest
impl RequestPermissionRequest
pub fn new(
session_id: impl Into<SessionId>,
tool_call: ToolCallUpdate,
options: Vec<PermissionOption>,
) -> RequestPermissionRequest
pub fn new( session_id: impl Into<SessionId>, tool_call: ToolCallUpdate, options: Vec<PermissionOption>, ) -> RequestPermissionRequest
Builds RequestPermissionRequest with the required request fields set; optional fields start unset or empty.
pub fn meta(
self,
meta: impl IntoOption<Map<String, Value>>,
) -> RequestPermissionRequest
pub fn meta( self, meta: impl IntoOption<Map<String, Value>>, ) -> RequestPermissionRequest
The _meta property is reserved by ACP to allow clients and agents to attach additional metadata to their interactions. Implementations MUST NOT make assumptions about values at these keys.
See protocol docs: Extensibility
Trait Implementations§
§impl Clone for RequestPermissionRequest
impl Clone for RequestPermissionRequest
§fn clone(&self) -> RequestPermissionRequest
fn clone(&self) -> RequestPermissionRequest
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more§impl Debug for RequestPermissionRequest
impl Debug for RequestPermissionRequest
§impl<'de> Deserialize<'de> for RequestPermissionRequest
impl<'de> Deserialize<'de> for RequestPermissionRequest
§fn deserialize<__D>(
__deserializer: __D,
) -> Result<RequestPermissionRequest, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(
__deserializer: __D,
) -> Result<RequestPermissionRequest, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
§impl JsonRpcMessage for RequestPermissionRequest
impl JsonRpcMessage for RequestPermissionRequest
§fn matches_method(method: &str) -> bool
fn matches_method(method: &str) -> bool
§fn to_untyped_message(&self) -> Result<UntypedMessage, Error>
fn to_untyped_message(&self) -> Result<UntypedMessage, Error>
§fn parse_message(
method: &str,
params: &impl Serialize,
) -> Result<RequestPermissionRequest, Error>
fn parse_message( method: &str, params: &impl Serialize, ) -> Result<RequestPermissionRequest, Error>
§impl JsonRpcRequest for RequestPermissionRequest
impl JsonRpcRequest for RequestPermissionRequest
§impl JsonSchema for RequestPermissionRequest
impl JsonSchema for RequestPermissionRequest
§fn schema_name() -> Cow<'static, str>
fn schema_name() -> Cow<'static, str>
§fn schema_id() -> Cow<'static, str>
fn schema_id() -> Cow<'static, str>
§fn json_schema(generator: &mut SchemaGenerator) -> Schema
fn json_schema(generator: &mut SchemaGenerator) -> Schema
§fn inline_schema() -> bool
fn inline_schema() -> bool
$ref keyword. Read more§impl PartialEq for RequestPermissionRequest
impl PartialEq for RequestPermissionRequest
§impl Serialize for RequestPermissionRequest
impl Serialize for RequestPermissionRequest
§fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
impl StructuralPartialEq for RequestPermissionRequest
Auto Trait Implementations§
impl Freeze for RequestPermissionRequest
impl RefUnwindSafe for RequestPermissionRequest
impl Send for RequestPermissionRequest
impl Sync for RequestPermissionRequest
impl Unpin for RequestPermissionRequest
impl UnsafeUnpin for RequestPermissionRequest
impl UnwindSafe for RequestPermissionRequest
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more