Package com.tnsai.server.ws
Enum Class AutonomyLevel
- All Implemented Interfaces:
Serializable,Comparable<AutonomyLevel>,Constable
Autonomy levels controlling when user approval is required for tool calls.
Note: FULL_AUTO and SUPERVISED currently share identical behavior (both ask for HIGH+CRITICAL). The distinction exists for future granularity in sandbox/non-interactive environments.
Matrix:
Level | LOW risk | MEDIUM risk | HIGH risk | CRITICAL risk ------------|-----------|-------------|-----------|--------------- FULL_AUTO | Auto | Auto | Ask | Ask SUPERVISED | Auto | Auto | Ask | Ask CAUTIOUS | Auto | Ask | Ask | Ask MANUAL | Ask | Ask | Ask | Ask
ESCALATION risk is always rejected (not asked) regardless of autonomy level.
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>> -
Enum Constant Summary
Enum Constants -
Method Summary
Modifier and TypeMethodDescriptionbooleanrequiresApproval(ToolRisk risk) Returnstrueif this autonomy level requires user approval for the given risk.static AutonomyLevelReturns the enum constant of this class with the specified name.static AutonomyLevel[]values()Returns an array containing the constants of this enum class, in the order they are declared.Methods inherited from class java.lang.Enum
compareTo, describeConstable, equals, getDeclaringClass, hashCode, name, ordinal, toString, valueOf
-
Enum Constant Details
-
FULL_AUTO
-
SUPERVISED
-
CAUTIOUS
-
MANUAL
-
-
Method Details
-
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
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 nameNullPointerException- if the argument is null
-
requiresApproval
Returnstrueif this autonomy level requires user approval for the given risk. ESCALATION is never "approved" — it is always rejected before this check.
-