Record Class SkillActivationEvent

java.lang.Object
java.lang.Record
com.tnsai.events.SkillActivationEvent
Record Components:
eventId - unique event id
timestamp - when the activation occurred
runId - the agent run/session id (may be null for programmatic invokes outside a chat turn)
agentName - the agent that activated the skill
skillName - activated skill's name
source - what triggered the activation
arguments - positional arguments (may be empty)
All Implemented Interfaces:
TnsAIEvent

public record SkillActivationEvent(String eventId, Instant timestamp, String runId, String agentName, String skillName, SkillActivationEvent.Source source, List<String> arguments) extends Record implements TnsAIEvent
Emitted whenever a com.tnsai.skills.Skill is activated for an agent (TNS-289). Carries the skill's identity and the source of the activation so audit / hook consumers can correlate skill loading with the message or programmatic call that triggered it.
Since:
0.10.0 (TNS-289)
  • Constructor Details

    • SkillActivationEvent

      public SkillActivationEvent(String eventId, Instant timestamp, String runId, String agentName, String skillName, SkillActivationEvent.Source source, List<String> arguments)
      Creates an instance of a SkillActivationEvent record class.
      Parameters:
      eventId - the value for the eventId record component
      timestamp - the value for the timestamp record component
      runId - the value for the runId record component
      agentName - the value for the agentName record component
      skillName - the value for the skillName record component
      source - the value for the source record component
      arguments - the value for the arguments record component
  • Method Details

    • of

      public static SkillActivationEvent of(String agentName, String skillName, SkillActivationEvent.Source source, List<String> arguments)
    • toString

      public final String toString()
      Returns a string representation of this record class. The representation contains the name of the class, followed by the name and value of each of the record components.
      Specified by:
      toString in class Record
      Returns:
      a string representation of this object
    • hashCode

      public final int hashCode()
      Returns a hash code value for this object. The value is derived from the hash code of each of the record components.
      Specified by:
      hashCode in class Record
      Returns:
      a hash code value for this object
    • equals

      public final boolean equals(Object o)
      Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. All components in this record class are compared with Objects::equals(Object,Object).
      Specified by:
      equals in class Record
      Parameters:
      o - the object with which to compare
      Returns:
      true if this object is the same as the o argument; false otherwise.
    • eventId

      public String eventId()
      Returns the value of the eventId record component.
      Specified by:
      eventId in interface TnsAIEvent
      Returns:
      the value of the eventId record component
    • timestamp

      public Instant timestamp()
      Returns the value of the timestamp record component.
      Specified by:
      timestamp in interface TnsAIEvent
      Returns:
      the value of the timestamp record component
    • runId

      public String runId()
      Returns the value of the runId record component.
      Returns:
      the value of the runId record component
    • agentName

      public String agentName()
      Returns the value of the agentName record component.
      Returns:
      the value of the agentName record component
    • skillName

      public String skillName()
      Returns the value of the skillName record component.
      Returns:
      the value of the skillName record component
    • source

      public SkillActivationEvent.Source source()
      Returns the value of the source record component.
      Returns:
      the value of the source record component
    • arguments

      public List<String> arguments()
      Returns the value of the arguments record component.
      Returns:
      the value of the arguments record component