Package com.tnsai.tools
Enum Class ToolRiskLevel
- All Implemented Interfaces:
Serializable,Comparable<ToolRiskLevel>,Constable
Risk classification for a
's execution. Distinct from
which is a boolean gate — the level
lets policy engines (default-deny registries, audit pipelines) reason
about gradient instead of all-or-nothing.
invalid reference
Tool
invalid reference
Tool#requiresConfirmation()
Risk is about blast radius, not failure probability. A tool
that always works but writes to a payment processor is CRITICAL;
a tool that occasionally times out reading public Wikipedia is
LOW.
- Since:
- 0.5.0 (issue #18)
-
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 TypeMethodDescriptionstatic ToolRiskLevelReturns the enum constant of this class with the specified name.static ToolRiskLevel[]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
-
LOW
Read-only, idempotent, no external side effects beyond a cached HTTP GET. Safe to run unattended in autonomous chains. Examples: search, Wikipedia lookup, calculator. -
MEDIUM
Default. Network egress or local read with predictable cost; failures are recoverable. Examples: API calls with rate limits, file reads inside an allowed workspace. -
HIGH
Mutates external state but reversibly. Should surface in audit logs and may require confirmation in interactive flows. Examples: file writes, git commits, sending a draft message. -
CRITICAL
Irreversible or financially material. Default-deny in production policies; explicit approval per-call. Examples: shell with sudo, payment execution, deleting a remote resource, posting to a public channel.
-
-
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
-