pub enum HookResponseClass {
Show 20 variants
Observe,
InjectContext,
ModifyProjection,
RequestCompaction,
ModifyValidationHints,
ModifyToolRequest,
ModifyApprovalRequest,
Deny,
RequestApproval,
RequestRetry,
RewriteToolResult,
ModifySubagentRequest,
ModifyProcessRequest,
ValidateDetach,
RequestUsageRollupRepair,
RequestCleanupRepair,
MarkProtectedContext,
RequestProjectionAuditRepair,
StopCompletionWithRepairNeeded,
StopRun,
}Expand description
Enumerates the finite hook response class cases. Serialized names are part of the SDK contract; update fixtures when variants change.
Variants§
Observe
Use this variant when the contract needs to represent observe; selecting it has no side effect by itself.
InjectContext
Use this variant when the contract needs to represent inject context; selecting it has no side effect by itself.
ModifyProjection
Use this variant when the contract needs to represent modify projection; selecting it has no side effect by itself.
RequestCompaction
Use this variant when the contract needs to represent request compaction; selecting it has no side effect by itself.
ModifyValidationHints
Use this variant when the contract needs to represent modify validation hints; selecting it has no side effect by itself.
ModifyToolRequest
Use this variant when the contract needs to represent modify tool request; selecting it has no side effect by itself.
ModifyApprovalRequest
Use this variant when the contract needs to represent modify approval request; selecting it has no side effect by itself.
Deny
Use this variant when the contract needs to represent deny; selecting it has no side effect by itself.
RequestApproval
Use this variant when the contract needs to represent request approval; selecting it has no side effect by itself.
RequestRetry
Use this variant when the contract needs to represent request retry; selecting it has no side effect by itself.
RewriteToolResult
Use this variant when the contract needs to represent rewrite tool result; selecting it has no side effect by itself.
ModifySubagentRequest
Use this variant when the contract needs to represent modify subagent request; selecting it has no side effect by itself.
ModifyProcessRequest
Use this variant when the contract needs to represent modify process request; selecting it has no side effect by itself.
ValidateDetach
Use this variant when the contract needs to represent validate detach; selecting it has no side effect by itself.
RequestUsageRollupRepair
Use this variant when the contract needs to represent request usage rollup repair; selecting it has no side effect by itself.
RequestCleanupRepair
Use this variant when the contract needs to represent request cleanup repair; selecting it has no side effect by itself.
MarkProtectedContext
Use this variant when the contract needs to represent mark protected context; selecting it has no side effect by itself.
RequestProjectionAuditRepair
Use this variant when the contract needs to represent request projection audit repair; selecting it has no side effect by itself.
StopCompletionWithRepairNeeded
Use this variant when the contract needs to represent stop completion with repair needed; selecting it has no side effect by itself.
StopRun
Use this variant when the contract needs to represent stop run; selecting it has no side effect by itself.
Implementations§
Source§impl HookResponseClass
impl HookResponseClass
Sourcepub fn changes_behavior(&self) -> bool
pub fn changes_behavior(&self) -> bool
Returns whether changes behavior applies for this state. This is data-only and does not perform I/O, call host ports, append journals, publish events, or start processes.
Trait Implementations§
Source§impl Clone for HookResponseClass
impl Clone for HookResponseClass
Source§fn clone(&self) -> HookResponseClass
fn clone(&self) -> HookResponseClass
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for HookResponseClass
impl Debug for HookResponseClass
Source§impl<'de> Deserialize<'de> for HookResponseClass
impl<'de> Deserialize<'de> for HookResponseClass
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>,
Source§impl Hash for HookResponseClass
impl Hash for HookResponseClass
Source§impl Ord for HookResponseClass
impl Ord for HookResponseClass
Source§fn cmp(&self, other: &HookResponseClass) -> Ordering
fn cmp(&self, other: &HookResponseClass) -> Ordering
1.21.0 (const: unstable) · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Source§impl PartialEq for HookResponseClass
impl PartialEq for HookResponseClass
Source§fn eq(&self, other: &HookResponseClass) -> bool
fn eq(&self, other: &HookResponseClass) -> bool
self and other values to be equal, and is used by ==.