pub struct AskUserPrompt {
pub prompt: String,
pub options: Vec<String>,
pub default: Option<String>,
pub origin_command: String,
}Expand description
One queued operator prompt. The chain runner accumulates these
when hooks return HookDecision::AskUser and the chain doesn’t
terminate in Deny / clear Allow. The G7+ wiring layer will
fan these out to the operator surface (CLI / MCP / HTTP) and
resume the chain on the human’s choice.
We keep this distinct from HookDecision::AskUser so the queue
representation can grow (correlation ids, hook origin tags, …)
without churning the wire-format enum the executor parses.
Fields§
§prompt: StringThe text shown to the operator. Verbatim from the hook’s
prompt field.
options: Vec<String>The selectable options, in the order the hook listed them.
default: Option<String>Optional default; the runner falls back to this on operator timeout.
origin_command: StringPath of the hook that queued the prompt. Lets the operator surface display “why am I being asked this?”.
Trait Implementations§
Source§impl Clone for AskUserPrompt
impl Clone for AskUserPrompt
Source§fn clone(&self) -> AskUserPrompt
fn clone(&self) -> AskUserPrompt
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 AskUserPrompt
impl Debug for AskUserPrompt
impl Eq for AskUserPrompt
Source§impl PartialEq for AskUserPrompt
impl PartialEq for AskUserPrompt
Source§fn eq(&self, other: &AskUserPrompt) -> bool
fn eq(&self, other: &AskUserPrompt) -> bool
self and other values to be equal, and is used by ==.impl StructuralPartialEq for AskUserPrompt
Auto Trait Implementations§
impl Freeze for AskUserPrompt
impl RefUnwindSafe for AskUserPrompt
impl Send for AskUserPrompt
impl Sync for AskUserPrompt
impl Unpin for AskUserPrompt
impl UnsafeUnpin for AskUserPrompt
impl UnwindSafe for AskUserPrompt
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.impl<T> ErasedDestructor for Twhere
T: 'static,
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