接口 TaskManager

所有已知实现类:
InMemoryTaskManager

public interface TaskManager
Interface for managing tasks in the A2A system. The TaskManager is responsible for handling the lifecycle and state of tasks.
  • 方法详细资料

    • loadOrCreateContext

      RequestContext loadOrCreateContext(MessageSendParams params)
      Load or create a new task.
      参数:
      params - The task param to create
      返回:
      The created task with a generated ID
    • getTask

      Task getTask(String taskId)
      Gets a task by its ID.
      参数:
      taskId - The ID of the task
      返回:
      The task with the specified ID, or null if not found
    • applyTaskUpdate

      reactor.core.publisher.Mono<Task> applyTaskUpdate(Task task, List<TaskUpdate> taskUpdates)
      apply take update for task
      参数:
      task - TaskContext
      taskUpdates - taskUpdate TaskStatus or Artifact update
      返回:
      mono of task
    • applyTaskUpdate

      reactor.core.publisher.Mono<Task> applyTaskUpdate(Task task, TaskUpdate update)
      apply task update for task
      参数:
      task - TaskContext
      update - tash update TaskStatus or Artifact update
      返回:
      mono of task
    • applyStatusUpdate

      reactor.core.publisher.Mono<Task> applyStatusUpdate(Task task, TaskStatusUpdateEvent event)
      Apply status update with append support from TaskStatusUpdateEvent
      参数:
      task - The task to update
      event - The TaskStatusUpdateEvent containing status information
      返回:
      Updated task
    • applyArtifactUpdate

      reactor.core.publisher.Mono<Task> applyArtifactUpdate(Task task, TaskArtifactUpdateEvent event)
      Apply artifact update with append support from TaskArtifactUpdateEvent
      参数:
      task - The task to update
      event - The TaskArtifactUpdateEvent containing artifact and append information
      返回:
      Updated task
    • registerTaskNotification

      void registerTaskNotification(TaskPushNotificationConfig config)
      register task notification config
      参数:
      config - notification config
    • getTaskNotification

      TaskPushNotificationConfig getTaskNotification(String taskId)
      get task notification config
      参数:
      taskId - task id
      返回:
      notification config