#[non_exhaustive]pub enum Request {
ApprovalRequest(ApprovalRequest),
ToolCallRequest(ToolCallRequest),
QuestionRequest(QuestionRequest),
HookRequest(HookRequest),
}Expand description
A request from the agent to the client, sent via the request method.
The client must respond before the agent can continue execution.
Wire type names are PascalCase (e.g. ApprovalRequest).
Serialization follows the official wire envelope format:
{"type": "ApprovalRequest", "payload": {"id": ...}}.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
ApprovalRequest(ApprovalRequest)
Request for user approval before executing a tool.
ToolCallRequest(ToolCallRequest)
Request to execute a tool.
QuestionRequest(QuestionRequest)
Interactive question for the user.
HookRequest(HookRequest)
Hook trigger notification.
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Request
impl<'de> Deserialize<'de> for Request
Source§fn deserialize<D: Deserializer<'de>>(deserializer: D) -> Result<Self, D::Error>
fn deserialize<D: Deserializer<'de>>(deserializer: D) -> Result<Self, D::Error>
Deserialize this value from the given Serde deserializer. Read more
Source§impl RequestExt for Request
impl RequestExt for Request
impl StructuralPartialEq for Request
Auto Trait Implementations§
impl Freeze for Request
impl RefUnwindSafe for Request
impl Send for Request
impl Sync for Request
impl Unpin for Request
impl UnsafeUnpin for Request
impl UnwindSafe for Request
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