Class WorkspaceProtocolTaskRepository

java.lang.Object
io.agentscope.extensions.agentprotocol.WorkspaceProtocolTaskRepository
All Implemented Interfaces:
ProtocolTaskRepository

public final class WorkspaceProtocolTaskRepository extends Object implements ProtocolTaskRepository
ProtocolTaskRepository backed by a dedicated WorkspaceManager writing into the synthetic AgentProtocolConstants.PROTOCOL_AGENT_ID / AgentProtocolConstants.PROTOCOL_SESSION_ID bucket.

Pass a manager rooted at the protocol control-plane path (not an execution agent's workspace) so multi-agent deployments keep task metadata separate from each agent's files.

  • Constructor Summary

    Constructors
    Constructor
    Description
    WorkspaceProtocolTaskRepository(io.agentscope.harness.agent.workspace.WorkspaceManager workspaceManager)
     
    Creates a repository rooted at taskStorePath with a fresh local workspace manager.
  • Method Summary

    Modifier and Type
    Method
    Description
    Optional<io.agentscope.harness.agent.subagent.task.TaskRecord>
    find(String taskId)
    Returns the task with the given id, or empty if unknown.
    void
    save(io.agentscope.harness.agent.subagent.task.TaskRecord record)
    Upserts the given task record.
    io.agentscope.harness.agent.workspace.WorkspaceManager
    Returns the underlying workspace manager (control-plane root only).

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • WorkspaceProtocolTaskRepository

      public WorkspaceProtocolTaskRepository(io.agentscope.harness.agent.workspace.WorkspaceManager workspaceManager)
    • WorkspaceProtocolTaskRepository

      public WorkspaceProtocolTaskRepository(Path taskStorePath)
      Creates a repository rooted at taskStorePath with a fresh local workspace manager.
  • Method Details

    • workspaceManager

      public io.agentscope.harness.agent.workspace.WorkspaceManager workspaceManager()
      Returns the underlying workspace manager (control-plane root only).
    • save

      public void save(io.agentscope.harness.agent.subagent.task.TaskRecord record)
      Description copied from interface: ProtocolTaskRepository
      Upserts the given task record.
      Specified by:
      save in interface ProtocolTaskRepository
    • find

      public Optional<io.agentscope.harness.agent.subagent.task.TaskRecord> find(String taskId)
      Description copied from interface: ProtocolTaskRepository
      Returns the task with the given id, or empty if unknown.
      Specified by:
      find in interface ProtocolTaskRepository