pub enum HookShape {
Asks,
DenyOnly,
CamelCase,
Context,
}Expand description
The hook contract a call arrived in, told apart by its stdin. The
runners share one name for the answer, permissionDecision, but not
what they do with it.
Variants§
Asks
snake_case stdin; permissionDecision takes deny or ask.
DenyOnly
snake_case stdin carrying turn_id; deny only, and an ask is
rejected as unsupported and the tool runs.
CamelCase
camelCase stdin (hookEventName, toolInput); a top-level
decision blocks, and there is no ask.
Context
lower-case event names (pre_llm_call, pre_tool_call) with the
prompt under extra.user_message; a top-level context is
injected, decision: block blocks, and there is no ask.
Implementations§
Trait Implementations§
impl Copy for HookShape
impl Eq for HookShape
impl StructuralPartialEq for HookShape
Auto Trait Implementations§
impl Freeze for HookShape
impl RefUnwindSafe for HookShape
impl Send for HookShape
impl Sync for HookShape
impl Unpin for HookShape
impl UnsafeUnpin for HookShape
impl UnwindSafe for HookShape
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
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§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
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> ⓘ
Converts
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> ⓘ
Converts
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