pub struct GateRequest {
pub gate_id: GateId,
pub proposal_id: ProposalId,
pub summary: String,
pub agent_id: String,
pub rationale: Option<String>,
pub context_data: Vec<ContextItem>,
pub cycle: u32,
pub requested_at: Timestamp,
pub timeout: TimeoutPolicy,
}Expand description
Request for human approval, emitted when convergence pauses at a HITL gate.
The hosting application receives this and is responsible for notifying the human via whatever channel is configured (Slack, email, UI, etc.).
Fields§
§gate_id: GateIdUnique ID for this gate request (used to resume).
proposal_id: ProposalIdThe proposal awaiting approval.
summary: StringHuman-readable summary of what the agent proposed.
agent_id: StringWhich agent made the proposal.
rationale: Option<String>Suggestor’s stated reason for the proposal.
context_data: Vec<ContextItem>Key data the agent used to make this proposal (for human context).
cycle: u32The convergence cycle that was interrupted.
requested_at: TimestampWhen the gate was triggered.
timeout: TimeoutPolicyTimeout policy in effect.
Implementations§
Source§impl GateRequest
impl GateRequest
Sourcepub fn with_rationale(self, rationale: impl Into<String>) -> GateRequest
pub fn with_rationale(self, rationale: impl Into<String>) -> GateRequest
Add rationale for the proposal.
Sourcepub fn with_context(self, items: Vec<ContextItem>) -> GateRequest
pub fn with_context(self, items: Vec<ContextItem>) -> GateRequest
Add context data for human review.
Trait Implementations§
Source§impl Clone for GateRequest
impl Clone for GateRequest
Source§fn clone(&self) -> GateRequest
fn clone(&self) -> GateRequest
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 moreSource§impl Debug for GateRequest
impl Debug for GateRequest
Source§impl<'de> Deserialize<'de> for GateRequest
impl<'de> Deserialize<'de> for GateRequest
Source§fn deserialize<__D>(
__deserializer: __D,
) -> Result<GateRequest, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(
__deserializer: __D,
) -> Result<GateRequest, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl Serialize for GateRequest
impl Serialize for GateRequest
Source§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,
Serialize this value into the given Serde serializer. Read more
Auto Trait Implementations§
impl Freeze for GateRequest
impl RefUnwindSafe for GateRequest
impl Send for GateRequest
impl Sync for GateRequest
impl Unpin for GateRequest
impl UnsafeUnpin for GateRequest
impl UnwindSafe for GateRequest
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