pub struct ElicitationPayload {
pub id: Option<String>,
pub status: Option<ElicitationStatusKind>,
pub outcome: Option<ElicitationOutcomeKind>,
pub approver: Option<String>,
pub intent_id: Option<String>,
pub expires_at: Option<String>,
pub valid: Option<bool>,
pub reason: Option<String>,
pub metadata: HashMap<String, Value>,
/* private fields */
}Expand description
State threaded through the Elicitation hook chain. See the
module-level docs for the input/accumulator split. Input fields are
private (set once via the constructor + builders, never mutated).
Output fields are pub (handlers populate on clones and return the
updated payload).
Fields§
§id: Option<String>Correlation id minted on Dispatch. The agent echoes it on retry.
status: Option<ElicitationStatusKind>Current status — set by Check (and Dispatch, which leaves it
Pending).
outcome: Option<ElicitationOutcomeKind>Approved / denied — set by Check once status is Resolved.
approver: Option<String>Resolved approver identity — set by Dispatch (when known) and by
Validate (the consenting party, cross-checked against from).
intent_id: Option<String>Registered intent id (lodging-intent binding) — set by Dispatch
and echoed by Validate for audit reconciliation.
expires_at: Option<String>Expiry timestamp (RFC 3339) — set by Dispatch when the channel
reports one.
valid: Option<bool>Genuineness verdict — set by Validate. true when the signed
response validates, its intent binding matches, and the responder
is the approver. (The runtime layers the scope-over-args check on
top before honoring an approval.)
reason: Option<String>Why a Check/Validate reported the state it did — failure reason
when valid is false, or diagnostic context. None on success.
metadata: HashMap<String, Value>Optional handler metadata (telemetry, diagnostics). Not load-bearing.
Implementations§
Source§impl ElicitationPayload
impl ElicitationPayload
Sourcepub fn new(
operation: ElicitationOp,
kind: impl Into<String>,
from: impl Into<String>,
) -> Self
pub fn new( operation: ElicitationOp, kind: impl Into<String>, from: impl Into<String>, ) -> Self
Construct a payload for the given operation + kind + resolved
approver. Optional input slots are set via the .with_* builders;
output fields start empty and accumulate as the handler runs.
Sourcepub fn with_elicitation_id(self, id: impl Into<String>) -> Self
pub fn with_elicitation_id(self, id: impl Into<String>) -> Self
Set the correlation id (check / validate operations).
pub fn with_purpose(self, purpose: impl Into<String>) -> Self
pub fn with_scope(self, scope: impl Into<String>) -> Self
pub fn with_timeout(self, timeout: impl Into<String>) -> Self
pub fn with_channel(self, channel: impl Into<String>) -> Self
pub fn operation(&self) -> ElicitationOp
pub fn elicitation_id(&self) -> Option<&str>
pub fn kind(&self) -> &str
pub fn from(&self) -> &str
pub fn purpose(&self) -> Option<&str>
pub fn scope(&self) -> Option<&str>
pub fn timeout(&self) -> Option<&str>
pub fn channel(&self) -> Option<&str>
Sourcepub fn from_pipeline_result(result: &PipelineResult) -> Option<Self>
pub fn from_pipeline_result(result: &PipelineResult) -> Option<Self>
Pull the resolved ElicitationPayload out of a PipelineResult
returned by mgr.invoke_entries::<ElicitationHook>(...). Returns
None when the pipeline was denied or the result’s payload wasn’t
an ElicitationPayload. Same contract as
DelegationPayload::from_pipeline_result.
Trait Implementations§
Source§impl Clone for ElicitationPayload
impl Clone for ElicitationPayload
Source§fn clone(&self) -> ElicitationPayload
fn clone(&self) -> ElicitationPayload
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 ElicitationPayload
impl Debug for ElicitationPayload
Source§impl<'de> Deserialize<'de> for ElicitationPayload
impl<'de> Deserialize<'de> for ElicitationPayload
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 PluginPayload for ElicitationPayload
impl PluginPayload for ElicitationPayload
Source§fn clone_boxed(&self) -> Box<dyn PluginPayload>
fn clone_boxed(&self) -> Box<dyn PluginPayload>
Box<dyn PluginPayload>. Read moreSource§fn as_any_mut(&mut self) -> &mut dyn Any
fn as_any_mut(&mut self) -> &mut dyn Any
&mut dyn Any.