pub struct ApprovalRequest {Show 16 fields
pub approval_id: String,
pub policy_id: String,
pub subject_id: AgentId,
pub capability_id: String,
pub subject_public_key: Option<PublicKey>,
pub tool_server: ServerId,
pub tool_name: String,
pub action: String,
pub parameter_hash: String,
pub expires_at: u64,
pub callback_hint: Option<String>,
pub created_at: u64,
pub summary: String,
pub governed_intent: Option<GovernedTransactionIntent>,
pub trusted_approvers: Vec<PublicKey>,
pub triggered_by: Vec<String>,
}Expand description
A request for human approval, produced when the approval guard
returns Verdict::PendingApproval. Designed to be serialized into
the approval store and the webhook payload without further wrapping.
Fields§
§approval_id: StringUnique request identifier. Caller-stable so the approval store can be keyed on this value. Callers should supply a UUIDv7.
policy_id: StringThe policy / grant identifier that triggered the approval.
subject_id: AgentIdThe calling agent’s identifier.
capability_id: StringCapability token ID bound to this request.
subject_public_key: Option<PublicKey>Public key of the capability subject this approval is bound to. A presented approval token must carry the same subject.
tool_server: ServerIdServer hosting the target tool.
tool_name: StringTool being invoked.
action: StringShort action verb for human summaries (e.g. invoke, charge).
parameter_hash: StringSHA-256 hex digest of the canonical JSON of the tool arguments / governed intent. Used to bind an approval token to this exact parameter set; a mutated argument payload will not satisfy the same approval.
expires_at: u64Unix seconds after which the request auto-denies (or escalates,
per timeout_action in the grant).
callback_hint: Option<String>Hint for channels about where the human can respond (e.g. the
URL of the dashboard or a Slack permalink). None means
“dispatcher will fill this in after sending”.
created_at: u64Unix seconds when the request was created.
summary: StringShort human-readable summary for dashboards.
governed_intent: Option<GovernedTransactionIntent>Original governed intent, when one is bound. Required for threshold-based approvals so the approver sees the financial envelope they are signing off on.
trusted_approvers: Vec<PublicKey>Public keys allowed to approve this request. The kernel fails closed when the set is empty or when the presented approver is not in the set.
triggered_by: Vec<String>Guards that triggered the approval requirement.
Trait Implementations§
Source§impl Clone for ApprovalRequest
impl Clone for ApprovalRequest
Source§fn clone(&self) -> ApprovalRequest
fn clone(&self) -> ApprovalRequest
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for ApprovalRequest
impl Debug for ApprovalRequest
Source§impl<'de> Deserialize<'de> for ApprovalRequest
impl<'de> Deserialize<'de> for ApprovalRequest
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Source§impl PartialEq for ApprovalRequest
impl PartialEq for ApprovalRequest
Source§impl Serialize for ApprovalRequest
impl Serialize for ApprovalRequest
impl StructuralPartialEq for ApprovalRequest
Auto Trait Implementations§
impl Freeze for ApprovalRequest
impl RefUnwindSafe for ApprovalRequest
impl Send for ApprovalRequest
impl Sync for ApprovalRequest
impl Unpin for ApprovalRequest
impl UnsafeUnpin for ApprovalRequest
impl UnwindSafe for ApprovalRequest
Blanket Implementations§
Source§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
Source§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
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
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>,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> 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