pub struct HookSpec {
pub name: String,
pub command: Vec<String>,
pub cwd: Option<PathBuf>,
pub env: HashMap<String, String>,
pub timeout_seconds: Option<u64>,
pub max_output_bytes: Option<u64>,
pub on_error: Option<HookOnError>,
pub suspend_mode: Option<HookSuspendMode>,
pub mutate: HookMutationConfig,
pub extra: HashMap<String, Value>,
}Expand description
Hook specification for a single lifecycle event mapping.
Fields§
§name: StringStable hook identifier used in telemetry and diagnostics.
command: Vec<String>Command argv form (command[0] executable + args).
cwd: Option<PathBuf>Optional working directory override.
env: HashMap<String, String>Optional environment variable overrides.
timeout_seconds: Option<u64>Per-hook timeout override in seconds.
max_output_bytes: Option<u64>Per-hook output cap override in bytes (applies per stream).
on_error: Option<HookOnError>Failure behavior (warn, block, suspend). Required in v1.
suspend_mode: Option<HookSuspendMode>Optional suspend strategy override for on_error: suspend.
mutate: HookMutationConfigMutation policy (opt-in, JSON-only contract enforced by validation/runtime).
extra: HashMap<String, Value>Unknown keys captured for v1 guardrails.
Trait Implementations§
Source§impl<'de> Deserialize<'de> for HookSpec
impl<'de> Deserialize<'de> for HookSpec
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 HookSpec
impl RefUnwindSafe for HookSpec
impl Send for HookSpec
impl Sync for HookSpec
impl Unpin for HookSpec
impl UnsafeUnpin for HookSpec
impl UnwindSafe for HookSpec
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