Record Class SubagentTaskView

java.lang.Object
java.lang.Record
io.agentscope.spring.boot.admin.dto.SubagentTaskView
Record Components:
taskId - backend-assigned task identifier
subagentId - the subagent type executing the task
status - one of the TaskStatus names
createdAt - task submission time
lastCheckedAt - last status read time
completed - convenience flag
resultPreview - first 500 chars of the result when completed, otherwise null
errorMessage - non-null when the task failed

public record SubagentTaskView(String taskId, String subagentId, String status, Instant createdAt, Instant lastCheckedAt, boolean completed, String resultPreview, String errorMessage) extends Record
Wire view of a BackgroundTask dispatched to a subagent. Distinct from AgentTaskView, which is the in-AgentState TodoWrite-style record.
  • Constructor Details

    • SubagentTaskView

      public SubagentTaskView(String taskId, String subagentId, String status, Instant createdAt, Instant lastCheckedAt, boolean completed, String resultPreview, String errorMessage)
      Creates an instance of a SubagentTaskView record class.
      Parameters:
      taskId - the value for the taskId record component
      subagentId - the value for the subagentId record component
      status - the value for the status record component
      createdAt - the value for the createdAt record component
      lastCheckedAt - the value for the lastCheckedAt record component
      completed - the value for the completed record component
      resultPreview - the value for the resultPreview record component
      errorMessage - the value for the errorMessage record component
  • Method Details

    • of

      public static SubagentTaskView of(io.agentscope.harness.agent.subagent.task.BackgroundTask 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. 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.
    • taskId

      public String taskId()
      Returns the value of the taskId record component.
      Returns:
      the value of the taskId record component
    • subagentId

      public String subagentId()
      Returns the value of the subagentId record component.
      Returns:
      the value of the subagentId record component
    • status

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

      public Instant createdAt()
      Returns the value of the createdAt record component.
      Returns:
      the value of the createdAt record component
    • lastCheckedAt

      public Instant lastCheckedAt()
      Returns the value of the lastCheckedAt record component.
      Returns:
      the value of the lastCheckedAt record component
    • completed

      public boolean completed()
      Returns the value of the completed record component.
      Returns:
      the value of the completed record component
    • resultPreview

      public String resultPreview()
      Returns the value of the resultPreview record component.
      Returns:
      the value of the resultPreview record component
    • errorMessage

      public String errorMessage()
      Returns the value of the errorMessage record component.
      Returns:
      the value of the errorMessage record component