ml-intern-api / agent /core /approval_policy.py
abidlabs's picture
abidlabs HF Staff
Deploy ML Intern API (backend + self-documenting frontend)
1635e66 verified
Raw
History Blame Contribute Delete
313 Bytes
"""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 ")