pub struct HookSpecificOutput<'a> {
pub hook_event_name: &'static str,
pub permission_decision: &'static str,
pub permission_decision_reason: Cow<'a, str>,
pub allow_once_code: Option<String>,
pub allow_once_full_hash: Option<String>,
pub rule_id: Option<String>,
pub pack_id: Option<String>,
pub severity: Option<Severity>,
pub confidence: Option<f64>,
pub remediation: Option<Remediation>,
}Expand description
Hook-specific output with decision and reason.
Fields§
§hook_event_name: &'static strAlways “PreToolUse” for this hook.
permission_decision: &'static strThe permission decision: “allow” or “deny”.
permission_decision_reason: Cow<'a, str>Human-readable explanation of the decision.
allow_once_code: Option<String>Short allow-once code (if a pending exception was recorded).
allow_once_full_hash: Option<String>Full hash for allow-once disambiguation (if available).
rule_id: Option<String>Stable rule identifier (e.g., “core.git:reset-hard”). Format: “{packId}:{patternName}”
pack_id: Option<String>Pack identifier that matched (e.g., “core.git”).
severity: Option<Severity>Severity level of the matched pattern.
confidence: Option<f64>Confidence score for this match (0.0-1.0). Higher values indicate higher confidence that this is a true positive.
remediation: Option<Remediation>Remediation suggestions for the blocked command.
Trait Implementations§
Source§impl<'a> Debug for HookSpecificOutput<'a>
impl<'a> Debug for HookSpecificOutput<'a>
Auto Trait Implementations§
impl<'a> Freeze for HookSpecificOutput<'a>
impl<'a> RefUnwindSafe for HookSpecificOutput<'a>
impl<'a> Send for HookSpecificOutput<'a>
impl<'a> Sync for HookSpecificOutput<'a>
impl<'a> Unpin for HookSpecificOutput<'a>
impl<'a> UnsafeUnpin for HookSpecificOutput<'a>
impl<'a> UnwindSafe for HookSpecificOutput<'a>
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> 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> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, _span: NoopSpan) -> Self
fn instrument(self, _span: NoopSpan) -> Self
Instruments this future with a span (no-op when disabled).
Source§fn in_current_span(self) -> Self
fn in_current_span(self) -> Self
Instruments this future with the current span (no-op when disabled).
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