Interface HistoryService

All Known Implementing Classes:
DefaultHistoryService

public interface HistoryService
History-timeline facade. 历史时间线门面。
Since:
JDK 25, opencode-base-flow V1.0.5
Author:
Leon Soo
  • Method Details

    • timeline

      List<HistoryRecord> timeline(String instanceId)
      Returns the full chronological timeline (earliest first) for an instance. 返回实例的完整时间线(按时间升序)。
      Parameters:
      instanceId - instance id — 实例 ID
      Returns:
      chronological history — 历史
      Since:
      JDK 25, opencode-base-flow V1.0.5
    • findByUser

      List<HistoryRecord> findByUser(String userId, int page, int size)
      Paginated history rows operated by the given user. 分页查询某用户的历史记录。
      Parameters:
      userId - operator user id — 操作人
      page - zero-based page — 页码(0 起)
      size - page size — 每页大小
      Returns:
      history rows — 历史
      Since:
      JDK 25, opencode-base-flow V1.0.5
    • findByTaskId

      Optional<HistoryRecord> findByTaskId(String taskId)
      Returns the single history row tied to the given task id (if any). 返回关联指定 task 的历史记录(若有)。
      Parameters:
      taskId - task id — 任务 ID
      Returns:
      history row (Optional) — 历史记录(Optional)
      Since:
      JDK 25, opencode-base-flow V1.0.5