Package com.tnsai.events
Record Class SkillActivationEvent
java.lang.Object
java.lang.Record
com.tnsai.events.SkillActivationEvent
- Record Components:
eventId- unique event idtimestamp- when the activation occurredrunId- the agent run/session id (may benullfor programmatic invokes outside a chat turn)agentName- the agent that activated the skillskillName- activated skill'snamesource- what triggered the activationarguments- 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)
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic enumWhy a skill was activated. -
Constructor Summary
ConstructorsConstructorDescriptionSkillActivationEvent(String eventId, Instant timestamp, String runId, String agentName, String skillName, SkillActivationEvent.Source source, List<String> arguments) Creates an instance of aSkillActivationEventrecord class. -
Method Summary
Modifier and TypeMethodDescriptionReturns the value of theagentNamerecord component.Returns the value of theargumentsrecord component.final booleanIndicates whether some other object is "equal to" this one.eventId()Returns the value of theeventIdrecord component.final inthashCode()Returns a hash code value for this object.static SkillActivationEventrunId()Returns the value of therunIdrecord component.Returns the value of theskillNamerecord component.source()Returns the value of thesourcerecord component.Returns the value of thetimestamprecord component.final StringtoString()Returns a string representation of this record class.Methods inherited from interface com.tnsai.events.TnsAIEvent
eventType
-
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 aSkillActivationEventrecord class.- Parameters:
eventId- the value for theeventIdrecord componenttimestamp- the value for thetimestamprecord componentrunId- the value for therunIdrecord componentagentName- the value for theagentNamerecord componentskillName- the value for theskillNamerecord componentsource- the value for thesourcerecord componentarguments- the value for theargumentsrecord component
-
-
Method Details
-
of
public static SkillActivationEvent of(String agentName, String skillName, SkillActivationEvent.Source source, List<String> arguments) -
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. -
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. -
equals
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 withObjects::equals(Object,Object). -
eventId
Returns the value of theeventIdrecord component.- Specified by:
eventIdin interfaceTnsAIEvent- Returns:
- the value of the
eventIdrecord component
-
timestamp
Returns the value of thetimestamprecord component.- Specified by:
timestampin interfaceTnsAIEvent- Returns:
- the value of the
timestamprecord component
-
runId
Returns the value of therunIdrecord component.- Returns:
- the value of the
runIdrecord component
-
agentName
Returns the value of theagentNamerecord component.- Returns:
- the value of the
agentNamerecord component
-
skillName
Returns the value of theskillNamerecord component.- Returns:
- the value of the
skillNamerecord component
-
source
Returns the value of thesourcerecord component.- Returns:
- the value of the
sourcerecord component
-
arguments
Returns the value of theargumentsrecord component.- Returns:
- the value of the
argumentsrecord component
-