Record Class AgentTaskView

java.lang.Object
java.lang.Record
io.agentscope.spring.boot.admin.dto.AgentTaskView

public record AgentTaskView(String id, String subject, String description, String state, String owner, String createdAt, List<String> blocks, List<String> blockedBy, Map<String,Object> metadata) extends Record
Read-only wire view of Task (the per-AgentState task record — the TodoWrite-style work-item list that an agent maintains for itself).

Distinct from SubagentTaskView, which describes a BackgroundTask dispatched to a subagent via TaskRepository.

  • Constructor Details

    • AgentTaskView

      public AgentTaskView(String id, String subject, String description, String state, String owner, String createdAt, List<String> blocks, List<String> blockedBy, Map<String,Object> metadata)
      Creates an instance of a AgentTaskView record class.
      Parameters:
      id - the value for the id record component
      subject - the value for the subject record component
      description - the value for the description record component
      state - the value for the state record component
      owner - the value for the owner record component
      createdAt - the value for the createdAt record component
      blocks - the value for the blocks record component
      blockedBy - the value for the blockedBy record component
      metadata - the value for the metadata record component
  • Method Details

    • of

      public static AgentTaskView of(io.agentscope.core.state.Task t)
    • 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.
    • id

      public String id()
      Returns the value of the id record component.
      Returns:
      the value of the id record component
    • subject

      public String subject()
      Returns the value of the subject record component.
      Returns:
      the value of the subject record component
    • description

      public String description()
      Returns the value of the description record component.
      Returns:
      the value of the description record component
    • state

      public String state()
      Returns the value of the state record component.
      Returns:
      the value of the state record component
    • owner

      public String owner()
      Returns the value of the owner record component.
      Returns:
      the value of the owner record component
    • createdAt

      public String createdAt()
      Returns the value of the createdAt record component.
      Returns:
      the value of the createdAt record component
    • blocks

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

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

      public Map<String,Object> metadata()
      Returns the value of the metadata record component.
      Returns:
      the value of the metadata record component