pub enum HookShape {
Asks,
DenyOnly,
CamelCase,
Context,
Steps,
}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.
Steps
camelCase stdin with conversationId, no event name (the hook is
told it with --event), the command under toolCall.args, the
prompt only in the transcript. A tool gate answers decision with
allow, deny or ask, which the runner asks; context goes in as
injectSteps; a Stop is held with decision: continue.
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
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
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> ⓘ
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