pub struct AutoApprovingElicitor;Expand description
ElicitationInvoker that immediately approves every elicitation:
dispatch returns a synthetic id (echoing the requested from as the
resolved approver), check reports Resolved { Approved } on the
first pass, and validate returns a genuine verdict. This lets a
single request flow dispatch → check → validate → allow without a real
channel — for evaluator tests and offline demos.
NOT for production: it makes no actual approval decision. Hosts wire a
real channel invoker (e.g. the apl-cpex ElicitationHandler bridge).
Trait Implementations§
Source§impl Default for AutoApprovingElicitor
impl Default for AutoApprovingElicitor
Source§fn default() -> AutoApprovingElicitor
fn default() -> AutoApprovingElicitor
Returns the “default value” for a type. Read more
Source§impl ElicitationInvoker for AutoApprovingElicitor
impl ElicitationInvoker for AutoApprovingElicitor
Source§fn dispatch<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
step: &'life1 ElicitStep,
resolved_from: &'life2 str,
) -> Pin<Box<dyn Future<Output = Result<ElicitationDispatch, ElicitationError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn dispatch<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
step: &'life1 ElicitStep,
resolved_from: &'life2 str,
) -> Pin<Box<dyn Future<Output = Result<ElicitationDispatch, ElicitationError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
First arrival. Register the intent and open the channel
backchannel for
step, returning the correlation id plus the
pending metadata the evaluator writes into the bag
(elicitation.id / .approver / .intent_id). Short and
synchronous — the human’s decision happens after this returns,
inside the channel. Read moreSource§fn check<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
_step: &'life1 ElicitStep,
_id: &'life2 str,
) -> Pin<Box<dyn Future<Output = Result<ElicitationStatus, ElicitationError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn check<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
_step: &'life1 ElicitStep,
_id: &'life2 str,
) -> Pin<Box<dyn Future<Output = Result<ElicitationStatus, ElicitationError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Retry. Read the current status of a dispatched elicitation by
id without blocking — Pending until the human acts, then
Resolved (carrying approved/denied) or Expired. step is
passed (the same step that dispatched) so the invoker can resolve
which handler plugin owns this elicitation — on a retry only the
id is in the bag, but the step is still in scope.Source§fn validate<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
_step: &'life1 ElicitStep,
_id: &'life2 str,
) -> Pin<Box<dyn Future<Output = Result<ElicitationValidation, ElicitationError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn validate<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
_step: &'life1 ElicitStep,
_id: &'life2 str,
) -> Pin<Box<dyn Future<Output = Result<ElicitationValidation, ElicitationError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Resolution. Verify that the resolved response is genuine — the
signed token validates, its intent binding matches this
id, and
the responder is the resolved approver. Returns the verdict plus
the facts the evaluator records for audit. The runtime applies the
scope-over-args check separately before honoring an approval.
step resolves the owning handler plugin (see check).Auto Trait Implementations§
impl Freeze for AutoApprovingElicitor
impl RefUnwindSafe for AutoApprovingElicitor
impl Send for AutoApprovingElicitor
impl Sync for AutoApprovingElicitor
impl Unpin for AutoApprovingElicitor
impl UnsafeUnpin for AutoApprovingElicitor
impl UnwindSafe for AutoApprovingElicitor
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