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).
  • Constructor Details

    • TeamContext

      public TeamContext(String teamName, String namespace, String objective, String myRole, boolean isLead, List<TeamContext.MemberSnapshot> members, List<String> availableActions)
    • 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 a TeamContext record class.
      Parameters:
      teamName - the value for the teamName record component
      namespace - the value for the namespace record component
      objective - the value for the objective record component
      myRole - the value for the myRole record component
      isLead - the value for the isLead record component
      members - the value for the members record component
      availableActions - the value for the availableActions record component
      recoveryContext - the value for the recoveryContext record component
  • Method Details

    • resolvedNamespace

      public String resolvedNamespace()
    • 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. Reference components are compared with Objects::equals(Object,Object); primitive components are compared with '=='.
      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.
    • teamName

      public String teamName()
      Returns the value of the teamName record component.
      Returns:
      the value of the teamName record component
    • namespace

      public String namespace()
      Returns the value of the namespace record component.
      Returns:
      the value of the namespace record component
    • objective

      public String objective()
      Returns the value of the objective record component.
      Returns:
      the value of the objective record component
    • myRole

      public String myRole()
      Returns the value of the myRole record component.
      Returns:
      the value of the myRole record component
    • isLead

      public boolean isLead()
      Returns the value of the isLead record component.
      Returns:
      the value of the isLead record component
    • members

      public List<TeamContext.MemberSnapshot> members()
      Returns the value of the members record component.
      Returns:
      the value of the members record component
    • availableActions

      public List<String> availableActions()
      Returns the value of the availableActions record component.
      Returns:
      the value of the availableActions record component
    • recoveryContext

      public TeamContext.RecoveryContext recoveryContext()
      Returns the value of the recoveryContext record component.
      Returns:
      the value of the recoveryContext record component