Skip to main content

gate_decision

Function gate_decision 

Source
pub fn gate_decision(
    hook_input: &Value,
    queued: Option<&QueuedSend>,
) -> Option<String>
Expand description

Decide one PreToolUse hook call. None allows it; Some(reason) denies.

Only a SendMessage whose to and message equal the queued pair is allowed; ListAgents is read-only and always allowed; anything else, or a send with nothing queued, is denied.