pub struct HookOutcome {
pub to_execute: Vec<ToolCallPayload>,
pub rejected: Vec<ToolResultPayload>,
pub unknown_decisions: Vec<UnknownDecision>,
}Expand description
Result of a hook pass.
Invariant: rejected must reuse the original payload.call_id from
the input batch; forging a new id would make append_tool_results
reject the entry with UnpairedToolResult. to_execute may rewrite
arguments (open FilterResult — approval can rewrite, defer, split).
rejected carries the recorded results only. A host precomputing an
UnknownOutcome result may pin its continuation action in
unknown_decisions; entries may be omitted and the driver then resolves
through its unknown-outcome configuration by the executed tool name.
Rejections with any other status take no action and need no entry.
Fields§
§to_execute: Vec<ToolCallPayload>Calls that pass the hook and reach the executor (arguments may have been rewritten).
rejected: Vec<ToolResultPayload>Calls the hook rejected; each result must reuse the input’s
call_id.
unknown_decisions: Vec<UnknownDecision>Explicit unknown-outcome actions for precomputed results whose
status is UnknownOutcome. Optional per entry; must not point at
to_execute, foreign ids, or results with any other status.
Implementations§
Source§impl HookOutcome
impl HookOutcome
Sourcepub fn passthrough(calls: Vec<ToolCallPayload>) -> Self
pub fn passthrough(calls: Vec<ToolCallPayload>) -> Self
Admit every call unchanged — no rejections.
Sourcepub fn with_unknown_decision(
self,
call_id: ToolCallId,
policy: UnknownOutcomePolicy,
) -> Self
pub fn with_unknown_decision( self, call_id: ToolCallId, policy: UnknownOutcomePolicy, ) -> Self
Builder: pin an explicit unknown-outcome action for one precomputed
result (its call_id, which must appear in rejected with status
UnknownOutcome).
Trait Implementations§
Source§impl Clone for HookOutcome
impl Clone for HookOutcome
Source§fn clone(&self) -> HookOutcome
fn clone(&self) -> HookOutcome
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more