Version: latest
agrag.memory.tasks.build_task_view
build_task_view(*, task_name:str, goal:str, status:TaskStatus, last_event_seq:int, step_counts:Mapping[StepState, int], steps:Sequence[StepSummary], decisions:Sequence[Decision] = (), decision_count:int | None = None, review_decisions:Sequence[Decision] = (), conflicts:Sequence[ConflictGroup] = (), conflicts_truncated:bool = False) -> TaskView
Assemble a resume view from a task's counts and step summaries.
The steps are sorted by STEP_STATE_ORDER and then by name, and the
first STEP_VIEW_LIMIT of them are shown. Counts come from the caller
and include steps that are not shown.
Parameters:
- task_name (
str) – The task name. - goal (
str) – The task goal. - status (
TaskStatus) – The task status. - last_event_seq (
int) – The sequence number of the last event, or 0. - step_counts (
Mapping[StepState, int]) – The number of steps in each state. Missing states count as zero. - steps (
Sequence[StepSummary]) – Step summaries to choose from. The list may be longer than the cap, or cover only part of the task. - decisions (
Sequence[Decision]) – Active decisions to include in the bounded resume view. - decision_count (
int | None) – Total active decisions before applying the view cap. - review_decisions (
Sequence[Decision]) – Active decisions that need review. - conflicts (
Sequence[ConflictGroup]) – Cross-task conflicts touching this task. - conflicts_truncated (
bool) – Whether more than ten conflicts match.
Returns: