Package io.agentscope.harness.agent.team
Record Class TeamContext
java.lang.Object
java.lang.Record
io.agentscope.harness.agent.team.TeamContext
public record TeamContext(String teamName, String namespace, String objective, String myRole, boolean isLead, List<TeamContext.MemberSnapshot> members, List<String> availableActions, TeamContext.RecoveryContext recoveryContext)
extends Record
Runtime context injected into a teammate session (mirrors Go TeamContext).
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final recordstatic final recordstatic final recordRoster snapshot embedded in TeamContext (not the full store member row).static final recordstatic final recordInjected when a member session is recovering after a crash/reschedule. -
Constructor Summary
ConstructorsConstructorDescriptionTeamContext(String teamName, String namespace, String objective, String myRole, boolean isLead, List<TeamContext.MemberSnapshot> members, List<String> availableActions) TeamContext(String teamName, String namespace, String objective, String myRole, boolean isLead, List<TeamContext.MemberSnapshot> members, List<String> availableActions, TeamContext.RecoveryContext recoveryContext) Creates an instance of aTeamContextrecord class. -
Method Summary
Modifier and TypeMethodDescriptionReturns the value of theavailableActionsrecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.booleanisLead()Returns the value of theisLeadrecord component.members()Returns the value of themembersrecord component.myRole()Returns the value of themyRolerecord component.Returns the value of thenamespacerecord component.Returns the value of theobjectiverecord component.Returns the value of therecoveryContextrecord component.teamName()Returns the value of theteamNamerecord component.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
TeamContext
-
TeamContext
public TeamContext(String teamName, String namespace, String objective, String myRole, boolean isLead, List<TeamContext.MemberSnapshot> members, List<String> availableActions, TeamContext.RecoveryContext recoveryContext) Creates an instance of aTeamContextrecord class.- Parameters:
teamName- the value for theteamNamerecord componentnamespace- the value for thenamespacerecord componentobjective- the value for theobjectiverecord componentmyRole- the value for themyRolerecord componentisLead- the value for theisLeadrecord componentmembers- the value for themembersrecord componentavailableActions- the value for theavailableActionsrecord componentrecoveryContext- the value for therecoveryContextrecord component
-
-
Method Details
-
resolvedNamespace
-
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. Reference components are compared withObjects::equals(Object,Object); primitive components are compared with '=='. -
teamName
Returns the value of theteamNamerecord component.- Returns:
- the value of the
teamNamerecord component
-
namespace
Returns the value of thenamespacerecord component.- Returns:
- the value of the
namespacerecord component
-
objective
Returns the value of theobjectiverecord component.- Returns:
- the value of the
objectiverecord component
-
myRole
Returns the value of themyRolerecord component.- Returns:
- the value of the
myRolerecord component
-
isLead
public boolean isLead()Returns the value of theisLeadrecord component.- Returns:
- the value of the
isLeadrecord component
-
members
Returns the value of themembersrecord component.- Returns:
- the value of the
membersrecord component
-
availableActions
Returns the value of theavailableActionsrecord component.- Returns:
- the value of the
availableActionsrecord component
-
recoveryContext
Returns the value of therecoveryContextrecord component.- Returns:
- the value of the
recoveryContextrecord component
-