Package com.tnsai.security.approval
Enum Class InterruptReason
- All Implemented Interfaces:
Serializable,Comparable<InterruptReason>,Constable
Reasons for requesting an interrupt in AG-UI protocol.
These reasons are sent to the frontend to help it display the appropriate UI for the interrupt.
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>> -
Enum Constant Summary
Enum ConstantsEnum ConstantDescriptionConfirmation step in a multi-step process.Custom reason not covered by standard reasons.An error occurred that needs human guidance to resolve.Requires human approval before executing a sensitive action.Action would violate a policy and needs human override.Additional information or file upload required from user. -
Method Summary
Modifier and TypeMethodDescriptionstatic InterruptReasonParses a reason from its string value.getValue()Gets the AG-UI protocol value.static InterruptReasonReturns the enum constant of this class with the specified name.static InterruptReason[]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
-
HUMAN_APPROVAL
Requires human approval before executing a sensitive action.Examples:
- Deleting data
- Financial transactions
- Sending emails
- Modifying configurations
-
UPLOAD_REQUIRED
Additional information or file upload required from user.Examples:
- Missing required parameters
- Need clarification on request
- File upload needed
-
POLICY_VIOLATION
Action would violate a policy and needs human override.Examples:
- Rate limit exceeded
- Budget constraint hit
- Access control violation
-
ERROR_RECOVERY
An error occurred that needs human guidance to resolve.Examples:
- API error requiring retry decision
- Ambiguous result needing clarification
- Partial failure needing decision
-
CONFIRMATION
Confirmation step in a multi-step process.Examples:
- Wizard confirmation page
- Order review before submission
- Summary confirmation
-
CUSTOM
Custom reason not covered by standard reasons.
-
-
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
-
getValue
Gets the AG-UI protocol value.- Returns:
- protocol value string
-
fromValue
Parses a reason from its string value.- Parameters:
value- the string value- Returns:
- the reason, or CUSTOM if not found
-