is_write_operation

Function is_write_operation 

Source
pub fn is_write_operation(tool_name: &str, arguments: &str) -> bool
Expand description

Determine if a tool operation is a write operation based on tool name and arguments.

Write operations include:

  • shell/bash/execute: commands that appear to modify state (best-effort classifier)
  • file: write/edit operations (or implicit write when content exists)
  • git: operations that modify repository state (commit/push/etc)

This classifier is intentionally conservative.