pub struct HookResponse {
pub plugin: String,
pub hook: String,
pub decision: HookDecision,
pub updated_input: Option<Value>,
pub additional_context: Option<String>,
}Expand description
One enabled hook’s parsed response to a hook event. Most hooks print
nothing and exit 0 — that’s an HookDecision::Allow with no extras, so
pre-contract hooks keep working unchanged.
Fields§
§plugin: StringPlugin that owns the responding hook.
hook: StringHook path (as declared in the manifest), for logs.
decision: HookDecisionThe allow-or-deny verdict.
updated_input: Option<Value>Replacement tool-arguments object (consulted on before_tool_use).
additional_context: Option<String>Context string to surface to the model on the next request.
Trait Implementations§
Source§impl Clone for HookResponse
impl Clone for HookResponse
Source§fn clone(&self) -> HookResponse
fn clone(&self) -> HookResponse
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for HookResponse
impl Debug for HookResponse
Source§impl Default for HookResponse
impl Default for HookResponse
Source§fn default() -> HookResponse
fn default() -> HookResponse
Returns the “default value” for a type. Read more
Source§impl PartialEq for HookResponse
impl PartialEq for HookResponse
impl StructuralPartialEq for HookResponse
Auto Trait Implementations§
impl Freeze for HookResponse
impl RefUnwindSafe for HookResponse
impl Send for HookResponse
impl Sync for HookResponse
impl Unpin for HookResponse
impl UnsafeUnpin for HookResponse
impl UnwindSafe for HookResponse
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