Package com.tnsai.agents.validation
Record Class Location
java.lang.Object
java.lang.Record
com.tnsai.agents.validation.Location
public record Location(Optional<String> roleClass, Optional<String> capabilityInterface, Optional<String> actionName, Optional<String> toolName)
extends Record
Where in the agent configuration a
ValidationIssue originates.
Every field is optional because issues vary in granularity: a missing-LLM error is agent-wide (no Location fields populated), an action-name conflict is role + action-name scoped, a tool-confirmation gap is tool-name scoped. Operators get progressively narrower context as the validators detect deeper problems.
- Since:
- 0.5.0 (issue #85)
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic LocationReturns the value of theactionNamerecord component.static LocationEmpty location — agent-wide issue, not scoped to any single role / action.Returns the value of thecapabilityInterfacerecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.static LocationReturns the value of theroleClassrecord component.static LocationtoolName()Returns the value of thetoolNamerecord component.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
Location
public Location(Optional<String> roleClass, Optional<String> capabilityInterface, Optional<String> actionName, Optional<String> toolName) Creates an instance of aLocationrecord class.- Parameters:
roleClass- the value for theroleClassrecord componentcapabilityInterface- the value for thecapabilityInterfacerecord componentactionName- the value for theactionNamerecord componenttoolName- the value for thetoolNamerecord component
-
-
Method Details
-
agentWide
Empty location — agent-wide issue, not scoped to any single role / action. -
role
-
tool
-
action
-
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). -
roleClass
Returns the value of theroleClassrecord component.- Returns:
- the value of the
roleClassrecord component
-
capabilityInterface
Returns the value of thecapabilityInterfacerecord component.- Returns:
- the value of the
capabilityInterfacerecord component
-
actionName
Returns the value of theactionNamerecord component.- Returns:
- the value of the
actionNamerecord component
-
toolName
Returns the value of thetoolNamerecord component.- Returns:
- the value of the
toolNamerecord component
-