Enum Class SideEffect

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

public enum SideEffect extends Enum<SideEffect>
What part of the world a
invalid reference
Tool
can change. A tool declares its effects via
invalid reference
Tool#getSideEffects()
; policy engines and sandbox configurators use the set to decide whether to permit, route, or audit the call.

An empty set means the tool is pure — it returns information without mutating anything reachable from the JVM.

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
    Enum Constant
    Description
    Reads or writes a database (SQL, NoSQL, cache, message broker).
    Reads or writes the local filesystem (paths inside or outside the workspace).
    Invokes git plumbing or porcelain commands locally.
    Sends a user-visible message on any channel (email, chat, SMS, push, social posting).
    Initiates outbound network requests (HTTP, gRPC, WebSocket, etc.).
    Triggers a financial transaction (payment, transfer, refund).
    Spawns a shell or executes binary commands.
  • Method Summary

    Modifier and Type
    Method
    Description
    static SideEffect
    Returns the enum constant of this class with the specified name.
    static SideEffect[]
    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

    Methods inherited from class java.lang.Object

    getClass, notify, notifyAll, wait, wait, wait
  • Enum Constant Details

    • FILESYSTEM

      public static final SideEffect FILESYSTEM
      Reads or writes the local filesystem (paths inside or outside the workspace).
    • NETWORK

      public static final SideEffect NETWORK
      Initiates outbound network requests (HTTP, gRPC, WebSocket, etc.).
    • GIT

      public static final SideEffect GIT
      Invokes git plumbing or porcelain commands locally.
    • SHELL

      public static final SideEffect SHELL
      Spawns a shell or executes binary commands. Distinct from FILESYSTEM because shell can do arbitrary things — always pair with elevated risk classification.
    • PAYMENT

      public static final SideEffect PAYMENT
      Triggers a financial transaction (payment, transfer, refund).
    • MESSAGING

      public static final SideEffect MESSAGING
      Sends a user-visible message on any channel (email, chat, SMS, push, social posting). Distinct from NETWORK because the recipient is human and the side effect is social, not just bytes.
    • DATABASE

      public static final SideEffect DATABASE
      Reads or writes a database (SQL, NoSQL, cache, message broker).
  • Method Details

    • values

      public static SideEffect[] 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 SideEffect 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