Package com.tnsai.context.snapshot
Enum Class SnapshotTrigger
- All Implemented Interfaces:
Serializable,Comparable<SnapshotTrigger>,Constable
Defines when context snapshots are captured.
Snapshot triggers determine the circumstances under which the agent's state is recorded. This enables correlation between snapshots and specific events in the agent lifecycle.
Usage Example
ContextSnapshot snapshot = contextManager.createSnapshot(SnapshotTrigger.PRE_DECISION);
// ... make decision ...
ContextSnapshot afterSnapshot = contextManager.createSnapshot(SnapshotTrigger.POST_DECISION);
SnapshotDiff diff = snapshot.diff(afterSnapshot);
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>> -
Enum Constant Summary
Enum ConstantsEnum ConstantDescriptionSnapshot taken when beliefs are revised.Snapshot taken when agent state is checkpointed.Snapshot taken when a conversation ends.Snapshot taken when a new conversation starts.Snapshot taken during error recovery.Snapshot taken when agent goals change.Snapshot taken on explicit request.Snapshot taken at regular intervals.Snapshot taken after a decision is made.Snapshot taken after tool execution.Snapshot taken before a decision is made.Snapshot taken before tool execution. -
Method Summary
Modifier and TypeMethodDescriptionstatic SnapshotTriggerReturns the enum constant of this class with the specified name.static SnapshotTrigger[]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
-
PRE_DECISION
Snapshot taken before a decision is made. Captures the agent's state when deliberation begins. -
POST_DECISION
Snapshot taken after a decision is made. Captures the result of deliberation. -
PERIODIC
Snapshot taken at regular intervals. Used for background state monitoring. -
MANUAL
Snapshot taken on explicit request. Used for debugging or inspection. -
ERROR_RECOVERY
Snapshot taken during error recovery. Captures state for post-mortem analysis. -
CHECKPOINT
Snapshot taken when agent state is checkpointed. Used for persistence and recovery. -
CONVERSATION_START
Snapshot taken when a new conversation starts. -
CONVERSATION_END
Snapshot taken when a conversation ends. -
PRE_TOOL_CALL
Snapshot taken before tool execution. -
POST_TOOL_CALL
Snapshot taken after tool execution. -
BELIEF_REVISION
Snapshot taken when beliefs are revised. -
GOAL_CHANGE
Snapshot taken when agent goals change.
-
-
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
-