Enum Class ToolRisk

java.lang.Object
java.lang.Enum<ToolRisk>
com.tnsai.server.tools.ToolRisk
All Implemented Interfaces:
Serializable, Comparable<ToolRisk>, Constable

public enum ToolRisk extends Enum<ToolRisk>
Risk classification for tool operations (ADR-8).
  • Enum Constant Details

    • READ_ONLY

      public static final ToolRisk READ_ONLY
      Safe read-only operations — auto-approve
    • BUILD_TEST

      public static final ToolRisk BUILD_TEST
      Build/test operations — auto-approve
    • WRITE

      public static final ToolRisk WRITE
      File write operations — ask user
    • DESTRUCTIVE

      public static final ToolRisk DESTRUCTIVE
      Destructive operations (rm -rf, git reset) — require explicit approval
    • NETWORK

      public static final ToolRisk NETWORK
      Network operations (curl, wget) — ask user
    • ESCALATION

      public static final ToolRisk ESCALATION
      Privilege escalation (sudo, su) — always reject
    • UNKNOWN

      public static final ToolRisk UNKNOWN
      Unknown commands — treat as high risk
  • Method Details

    • values

      public static ToolRisk[] values()
      Returns an array containing the constants of this enum class, in the order they are declared.
      Returns:
      an array containing the constants of this enum class, in the order they are declared
    • valueOf

      public static ToolRisk valueOf(String name)
      Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (Extraneous whitespace characters are not permitted.)
      Parameters:
      name - the name of the enum constant to be returned.
      Returns:
      the enum constant with the specified name
      Throws:
      IllegalArgumentException - if this enum class has no constant with the specified name
      NullPointerException - if the argument is null
    • requiresApproval

      public boolean requiresApproval()
    • isRejected

      public boolean isRejected()
    • label

      public String label()