Give each workflow run a parent task with no agent
This commit is contained in:
+16
-17
@@ -351,7 +351,7 @@ paths:
|
||||
operationId: createTask
|
||||
description: >
|
||||
Creates the task's branch and worktree from the project's default branch, and with prompt starts its agent, or
|
||||
with workflow, starts a run of that workflow from it.
|
||||
with workflow, creates a run of that workflow, whose stage tasks start from it.
|
||||
requestBody:
|
||||
required: true
|
||||
content:
|
||||
@@ -422,8 +422,8 @@ paths:
|
||||
get:
|
||||
operationId: getTaskWorkflow
|
||||
description: >
|
||||
The workflow the task froze when it was created, as it was then. Later edits and deletes of the workflow
|
||||
don't change it.
|
||||
The workflow the task's run froze when it was created, as it was then, for a workflow run's task or one of
|
||||
its stage tasks. Later edits and deletes of the workflow don't change it.
|
||||
responses:
|
||||
"200":
|
||||
description: The frozen workflow.
|
||||
@@ -455,8 +455,9 @@ paths:
|
||||
get:
|
||||
operationId: getWorkflowRun
|
||||
description: >
|
||||
The progress of the workflow run the task belongs to: the definition the task froze, and for each stage its
|
||||
state and every task that attempted it, with the attempts whose outputs each one started from.
|
||||
The progress of the workflow run whose task this is: the definition it froze, and for each stage its state
|
||||
and every task that attempted it, with the attempts whose outputs each one started from. 404 for a task that
|
||||
isn't a run's.
|
||||
responses:
|
||||
"200":
|
||||
description: The run's progress.
|
||||
@@ -1477,19 +1478,18 @@ components:
|
||||
forked_from: { type: string, description: "The task this one was forked from; absent for other tasks." }
|
||||
forked_at: { type: integer, description: "With forked_from: the n of the snapshot it was forked at." }
|
||||
merge_queued_at: { type: string, format: date-time, description: "When Merge was requested while another task in the project was merging; absent once the merge starts or when none is held." }
|
||||
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." }
|
||||
audit: { type: string, description: "The default branch commit this task audits, for a task of a run of its project's audit workflow; absent for other tasks." }
|
||||
background: { type: boolean, description: "Whether the task is an audit that hasn't asked for attention yet: no question, ready_for_merge or error so far. The app keeps it out of the task switcher and shows it muted on the Project tab, and the lead gets no signals about it." }
|
||||
workflow: { type: string, description: "For a workflow run's task: the name of the workflow it froze at creation (getTaskWorkflow has its copy). A run's task has no agent, worktree or branch (branch, worktree_path and base_ref are empty); its stage tasks are its subtasks, and it closes once they all have, as merged when any of them merged. Absent for other tasks." }
|
||||
workflow_stage: { type: string, description: "For a stage task of a workflow run: the name of the stage it runs; parent_task_id is the run's task. Absent for other tasks." }
|
||||
audit: { type: string, description: "The default branch commit an audit audits, on the task of a run of its project's audit workflow; absent for other tasks." }
|
||||
background: { type: boolean, description: "Whether the task is an audit's run or stage task that hasn't asked for attention yet: no question, ready_for_merge or error so far (for a run, from any of its stage tasks). The app keeps it out of the task switcher and shows it muted on the Project tab, and the lead gets no signals about it." }
|
||||
state:
|
||||
type: string
|
||||
description: "The one state the task is in, kept by the store in the same transaction as every change to it (a task.state event carries each change). The first that holds: merged or discarded once closed; discarding; asking while it has an open question; merging while a Merge or a merge into its parent is under way; merge_held while its Merge waits for another merge in the project; merge_after_review while a Merge with after_review waits for its review; running while one of its agents is mid-turn or has subagents running; reviewing while a review runs; review_pending between a turn's end and its snapshot's review starting or being skipped; ready_to_merge or discard_suggested when the agent's latest ready_for_merge or suggest_discard still stands; finished when it runs a workflow stage whose finish_stage has taken; idle; no_agent when it has no live agent."
|
||||
description: "The one state the task is in, kept by the store in the same transaction as every change to it (a task.state event carries each change). The first that holds: merged or discarded once closed; for a workflow run's task, finished once the run finished, running while one of its stage tasks is running, else idle; discarding; asking while it has an open question; merging while a Merge or a merge into its parent is under way; merge_held while its Merge waits for another merge in the project; merge_after_review while a Merge with after_review waits for its review; running while one of its agents is mid-turn or has subagents running; reviewing while a review runs; review_pending between a turn's end and its snapshot's review starting or being skipped; ready_to_merge or discard_suggested when the agent's latest ready_for_merge or suggest_discard still stands; finished when it runs a workflow stage whose finish_stage has taken; idle; no_agent when it has no live agent."
|
||||
enum: [running, idle, finished, review_pending, reviewing, merging, discarding, merged, discarded, no_agent, asking, merge_held, merge_after_review, ready_to_merge, discard_suggested]
|
||||
x-enum-varnames: [TaskStateRunning, TaskStateIdle, TaskStateFinished, TaskStateReviewPending, TaskStateReviewing, TaskStateMerging, TaskStateDiscarding, TaskStateMerged, TaskStateDiscarded, TaskStateNoAgent, TaskStateAsking, TaskStateMergeHeld, TaskStateMergeAfterReview, TaskStateReadyToMerge, TaskStateDiscardSuggested]
|
||||
merging: { type: boolean, description: "Whether a Merge was started and hasn't finished: its turn is running, or the turn ended and byre is squashing, pushing and closing the task." }
|
||||
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." }
|
||||
parent_task_id: { type: string, description: "The task whose agent created this one as its subtask, or for a stage task its workflow run's task; absent for other tasks." }
|
||||
merging_into_parent: { type: boolean, description: "Whether a merge of this subtask into its parent was requested and the parent hasn't merged it yet." }
|
||||
merge_after_review: { type: boolean, description: "Whether a Merge with after_review is waiting for the running review of the latest snapshot to finish." }
|
||||
summary_seq: { type: integer, format: int64, description: "The seq of the task's latest turn.ended event with summary: true; 0 when it has none." }
|
||||
@@ -1557,9 +1557,9 @@ components:
|
||||
workflow:
|
||||
type: string
|
||||
description: >
|
||||
The name of a saved workflow to run instead of creating one task with no agent: each stage that starts it
|
||||
becomes its own task, titled "<title>: <stage>", with the title as the run's brief. The response is the
|
||||
first of those tasks.
|
||||
The name of a saved workflow to run instead of creating one task with no agent: the run gets a task of its
|
||||
own, titled with the title, and each stage that starts it becomes its subtask, titled "<title>: <stage>",
|
||||
with the title as the run's brief. The response is the run's task.
|
||||
|
||||
WorkflowSummary:
|
||||
type: object
|
||||
@@ -1624,10 +1624,9 @@ components:
|
||||
|
||||
WorkflowRun:
|
||||
type: object
|
||||
required: [name, run, title, brief, definition, finished, stages]
|
||||
required: [name, title, brief, definition, finished, stages]
|
||||
properties:
|
||||
name: { type: string }
|
||||
run: { type: string }
|
||||
title: { type: string }
|
||||
brief: { type: string }
|
||||
definition: { $ref: "#/components/schemas/WorkflowDefinition" }
|
||||
|
||||
Reference in New Issue
Block a user