pub struct HookCommand {
pub type: HookCommandType,
pub command: Option<String>,
pub url: Option<String>,
pub prompt: Option<String>,
pub timeout: u64,
pub status_message: Option<String>,
pub once: bool,
pub async: bool,
pub async_rewake: bool,
pub fail_mode: HookFailMode,
}Expand description
A single hook command entry.
Fields§
§type: HookCommandTypeHow to run the hook.
command: Option<String>Shell command string (used when type = "command").
url: Option<String>HTTP endpoint URL (used when type = "http").
prompt: Option<String>LLM prompt template with optional $ARGUMENTS placeholder
(used when type = "prompt" or "agent").
timeout: u64Seconds to wait before timing out (default: 5).
status_message: Option<String>Optional human-readable spinner message shown in TUI.
once: boolWhen true, the hook runs only the first time and is then ignored.
async: boolWhen true, run hook in background — Agent continues immediately.
async_rewake: boolWhen true, run in background but interrupt the Agent if hook
exits with code 2.
fail_mode: HookFailModeFail behavior on timeout / error / non-zero exit.
Default: open (fail-open, same as pre-Goal-281 behavior).
Trait Implementations§
Source§impl Clone for HookCommand
impl Clone for HookCommand
Source§impl Debug for HookCommand
impl Debug for HookCommand
Source§impl Default for HookCommand
impl Default for HookCommand
Source§impl<'de> Deserialize<'de> for HookCommand
impl<'de> Deserialize<'de> for HookCommand
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
impl Freeze for HookCommand
impl RefUnwindSafe for HookCommand
impl Send for HookCommand
impl Sync for HookCommand
impl Unpin for HookCommand
impl UnsafeUnpin for HookCommand
impl UnwindSafe for HookCommand
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,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
impl<A, B, T> HttpServerConnExec<A, B> for Twhere
B: Body,
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> IntoMaybeUndefined<T> for T
impl<T> IntoMaybeUndefined<T> for T
Source§fn into_maybe_undefined(self) -> MaybeUndefined<T>
fn into_maybe_undefined(self) -> MaybeUndefined<T>
Converts this value into a three-state builder argument.
Source§impl<T> IntoOption<T> for T
impl<T> IntoOption<T> for T
Source§fn into_option(self) -> Option<T>
fn into_option(self) -> Option<T>
Converts this value into an optional builder argument.