ml-intern / agent /core /approval_policy.py
lewtun's picture
lewtun HF Staff
Add session YOLO auto-approval budget (#201)
77324b8 unverified
"""Shared predicates for approval-gated tool operations."""
from typing import Any
def normalize_tool_operation(operation: Any) -> str:
return str(operation or "").strip().lower()
def is_scheduled_operation(operation: Any) -> bool:
return normalize_tool_operation(operation).startswith("scheduled ")