Make task state store-owned and signal its changes to the lead
This commit is contained in:
+6
-2
@@ -1012,7 +1012,7 @@ components:
|
||||
|
||||
Task:
|
||||
type: object
|
||||
required: [id, project_id, title, merge_title, branch, worktree_path, base_ref, port_base, color, status, created_by, created_at, reviewing, merging, discarding, merging_into_parent, summary_seq]
|
||||
required: [id, project_id, title, merge_title, branch, worktree_path, base_ref, port_base, color, status, created_by, created_at, state, merging, discarding, merging_into_parent, summary_seq]
|
||||
properties:
|
||||
id: { type: string }
|
||||
project_id: { type: string }
|
||||
@@ -1038,7 +1038,11 @@ components:
|
||||
workflow: { type: string, description: "The name of the workflow the task froze at creation (getTaskWorkflow has its copy); absent for a task without one." }
|
||||
workflow_run: { type: string, description: "With workflow: the id every task of one run of the workflow shares." }
|
||||
workflow_stage: { type: string, description: "With workflow: the name of the stage this task runs." }
|
||||
reviewing: { type: boolean, description: "Whether a review of one of the task's snapshots is running." }
|
||||
state:
|
||||
type: string
|
||||
description: "What the task is doing, kept by the store in the same transaction as every change to it (a task.state event carries each change): merged or discarded once closed, else discarding, merging, the state of its agent's latest live session when that isn't idle, reviewing while a review runs, review_pending between a turn's end and its snapshot's review starting or being skipped, idle, or no_agent."
|
||||
enum: [running, idle, review_pending, reviewing, merging, discarding, merged, discarded, no_agent]
|
||||
x-enum-varnames: [TaskStateRunning, TaskStateIdle, TaskStateReviewPending, TaskStateReviewing, TaskStateMerging, TaskStateDiscarding, TaskStateMerged, TaskStateDiscarded, TaskStateNoAgent]
|
||||
merging: { type: boolean, description: "Whether a Merge was started and its turn hasn't ended yet." }
|
||||
discarding: { type: boolean, description: "Whether a Discard was started and the task isn't closed yet: its summary turn is waiting for the running turn, running, or done and the task is being removed." }
|
||||
parent_task_id: { type: string, description: "The task whose agent created this one as its subtask; absent for other tasks." }
|
||||
|
||||
Reference in New Issue
Block a user