Class ControlPlaneTaskRepository

java.lang.Object
io.agentscope.extensions.aistio.store.ControlPlaneTaskRepository
All Implemented Interfaces:
io.agentscope.harness.agent.subagent.task.TaskRepository

public final class ControlPlaneTaskRepository extends Object implements io.agentscope.harness.agent.subagent.task.TaskRepository
Control-plane hosted TaskRepository over /api/v1/dp/tasks/*.

Maintains in-memory BackgroundTask handles for tasks running on the current node while using the control plane as the authoritative persistence layer. Heartbeats live local tasks every 30 seconds via POST /tasks/heartbeat; there is no client-side orphan sweeper.

  • Nested Class Summary

    Nested classes/interfaces inherited from interface io.agentscope.harness.agent.subagent.task.TaskRepository

    io.agentscope.harness.agent.subagent.task.TaskRepository.TaskCompletionCallback
  • Field Summary

    Fields inherited from interface io.agentscope.harness.agent.subagent.task.TaskRepository

    SUPPRESS_COMPLETION_CALLBACK
  • Method Summary

    Modifier and Type
    Method
    Description
    boolean
    cancelTask(io.agentscope.core.agent.RuntimeContext rc, String sessionId, String taskId)
     
    List<io.agentscope.harness.agent.subagent.task.TaskDelivery>
    findPendingDeliveries(io.agentscope.core.agent.RuntimeContext rc, String sessionId)
     
    io.agentscope.harness.agent.subagent.task.BackgroundTask
    getTask(io.agentscope.core.agent.RuntimeContext rc, String sessionId, String taskId)
     
    boolean
    isDelivered(io.agentscope.core.agent.RuntimeContext rc, String sessionId, String taskId)
     
    Collection<io.agentscope.harness.agent.subagent.task.BackgroundTask>
    listTasks(io.agentscope.core.agent.RuntimeContext rc, String sessionId, io.agentscope.harness.agent.subagent.task.TaskStatus filter)
     
    void
    markDelivered(io.agentscope.core.agent.RuntimeContext rc, String sessionId, String taskId)
     
    io.agentscope.harness.agent.subagent.task.BackgroundTask
    putTask(io.agentscope.core.agent.RuntimeContext rc, String taskId, String subAgentId, String sessionId, io.agentscope.harness.agent.subagent.task.TaskRunSpec spec)
     
    void
    setCompletionCallback(io.agentscope.harness.agent.subagent.task.TaskRepository.TaskCompletionCallback callback)
     
    void
     

    Methods inherited from class java.lang.Object

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

    • setCompletionCallback

      public void setCompletionCallback(io.agentscope.harness.agent.subagent.task.TaskRepository.TaskCompletionCallback callback)
      Specified by:
      setCompletionCallback in interface io.agentscope.harness.agent.subagent.task.TaskRepository
    • putTask

      public io.agentscope.harness.agent.subagent.task.BackgroundTask putTask(io.agentscope.core.agent.RuntimeContext rc, String taskId, String subAgentId, String sessionId, io.agentscope.harness.agent.subagent.task.TaskRunSpec spec)
      Specified by:
      putTask in interface io.agentscope.harness.agent.subagent.task.TaskRepository
    • getTask

      public io.agentscope.harness.agent.subagent.task.BackgroundTask getTask(io.agentscope.core.agent.RuntimeContext rc, String sessionId, String taskId)
      Specified by:
      getTask in interface io.agentscope.harness.agent.subagent.task.TaskRepository
    • listTasks

      public Collection<io.agentscope.harness.agent.subagent.task.BackgroundTask> listTasks(io.agentscope.core.agent.RuntimeContext rc, String sessionId, io.agentscope.harness.agent.subagent.task.TaskStatus filter)
      Specified by:
      listTasks in interface io.agentscope.harness.agent.subagent.task.TaskRepository
    • cancelTask

      public boolean cancelTask(io.agentscope.core.agent.RuntimeContext rc, String sessionId, String taskId)
      Specified by:
      cancelTask in interface io.agentscope.harness.agent.subagent.task.TaskRepository
    • findPendingDeliveries

      public List<io.agentscope.harness.agent.subagent.task.TaskDelivery> findPendingDeliveries(io.agentscope.core.agent.RuntimeContext rc, String sessionId)
      Specified by:
      findPendingDeliveries in interface io.agentscope.harness.agent.subagent.task.TaskRepository
    • markDelivered

      public void markDelivered(io.agentscope.core.agent.RuntimeContext rc, String sessionId, String taskId)
      Specified by:
      markDelivered in interface io.agentscope.harness.agent.subagent.task.TaskRepository
    • isDelivered

      public boolean isDelivered(io.agentscope.core.agent.RuntimeContext rc, String sessionId, String taskId)
      Specified by:
      isDelivered in interface io.agentscope.harness.agent.subagent.task.TaskRepository
    • shutdown

      public void shutdown()
      Specified by:
      shutdown in interface io.agentscope.harness.agent.subagent.task.TaskRepository