pub struct QueryContext {
pub tool_name: String,
pub args: Vec<String>,
pub tool_input: Value,
pub hook_type: Option<String>,
pub agent_name: Option<String>,
pub fs_op: Option<String>,
pub fs_path: Option<String>,
pub net_domain: Option<String>,
pub mode: Option<String>,
}Expand description
The context passed to the evaluator, extracted from a tool invocation.
Fields§
§tool_name: StringThe tool name (e.g. “Bash”, “Read”).
args: Vec<String>Positional args (for Bash: parsed command parts).
tool_input: ValueThe full tool_input JSON.
hook_type: Option<String>Hook type, if this is a hook invocation.
agent_name: Option<String>Agent name, if this is an agent invocation.
fs_op: Option<String>Capability: filesystem operation (“read” or “write”), if applicable.
fs_path: Option<String>Capability: resolved filesystem path, if applicable.
net_domain: Option<String>Capability: network domain, if applicable.
mode: Option<String>Permission mode from Claude Code (e.g. “default”, “plan”).
Implementations§
Trait Implementations§
Auto Trait Implementations§
impl Freeze for QueryContext
impl RefUnwindSafe for QueryContext
impl Send for QueryContext
impl Sync for QueryContext
impl Unpin for QueryContext
impl UnsafeUnpin for QueryContext
impl UnwindSafe for QueryContext
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