Add team tasks: several agents in one worktree sharing a board
This commit is contained in:
+46
-6
@@ -489,6 +489,25 @@ paths:
|
||||
"404": { $ref: "#/components/responses/Error" }
|
||||
"409": { $ref: "#/components/responses/Error" }
|
||||
|
||||
/api/tasks/{taskId}/board:
|
||||
parameters:
|
||||
- { name: taskId, in: path, required: true, schema: { type: string } }
|
||||
post:
|
||||
operationId: postToBoard
|
||||
description: >
|
||||
Posts to a team task's board as the caller: records a board.posted event and sends the post to every agent of
|
||||
the team, starting a turn for an idle one and reaching a working one after its next tool call.
|
||||
requestBody:
|
||||
required: true
|
||||
content:
|
||||
application/json:
|
||||
schema: { $ref: "#/components/schemas/BoardPostCreate" }
|
||||
responses:
|
||||
"204": { description: The post was recorded and sent. }
|
||||
"400": { $ref: "#/components/responses/Error" }
|
||||
"404": { $ref: "#/components/responses/Error" }
|
||||
"409": { $ref: "#/components/responses/Error" }
|
||||
|
||||
/api/tasks/{taskId}/events:
|
||||
parameters:
|
||||
- { name: taskId, in: path, required: true, schema: { type: string } }
|
||||
@@ -1262,7 +1281,7 @@ components:
|
||||
|
||||
Stage:
|
||||
type: object
|
||||
required: [name, model, prompt]
|
||||
required: [name, prompt]
|
||||
properties:
|
||||
name: { type: string, description: "One line of 1 to 100 characters, unique within the workflow." }
|
||||
after:
|
||||
@@ -1279,8 +1298,22 @@ components:
|
||||
Where the stage's task branches from. parent (the default): the commit its one after stage finished at, or
|
||||
for a stage with none, where the workflow was started from. main: the project's default branch. Refused on
|
||||
a stage with more than one after stage, which always branches from the default branch.
|
||||
model: { type: string, description: "The stage agent's model, which also picks its vendor: gpt-* models run on Codex, every other model on Claude Code." }
|
||||
prompt: { type: string, description: "The stage agent's instructions." }
|
||||
model: { type: string, x-go-type-skip-optional-pointer: true, description: "The stage agent's model, which also picks its vendor: gpt-* models run on Codex, every other model on Claude Code. Required without agents, refused with them." }
|
||||
prompt: { type: string, description: "The stage agent's instructions; with agents, the instructions every agent of the team gets before its own." }
|
||||
agents:
|
||||
type: array
|
||||
items: { $ref: "#/components/schemas/TeamMember" }
|
||||
description: >
|
||||
Runs the stage as a team: several agents in the stage's one task and worktree, each on its own model, sharing a
|
||||
board. The first agent finishes the stage.
|
||||
|
||||
TeamMember:
|
||||
type: object
|
||||
required: [name, model, prompt]
|
||||
properties:
|
||||
name: { type: string, description: "The agent's name in the team, one line of 1 to 100 characters, unique within the team." }
|
||||
model: { type: string, description: "The agent's model, which also picks its vendor." }
|
||||
prompt: { type: string, description: "This agent's own instructions: its role in the team." }
|
||||
|
||||
TaskWorkflow:
|
||||
type: object
|
||||
@@ -1489,10 +1522,11 @@ components:
|
||||
|
||||
AgentSession:
|
||||
type: object
|
||||
required: [id, task_id, owner, vendor, model, vendor_session_id, state, role, created_by, created_at, subagents]
|
||||
required: [id, task_id, owner, vendor, model, vendor_session_id, state, role, member, created_by, created_at, subagents]
|
||||
properties:
|
||||
id: { type: string }
|
||||
task_id: { type: string, description: Empty for a lead session. }
|
||||
member: { type: string, description: "The agent's name in its task's team; empty on a task with one agent, and for leads and reviewers." }
|
||||
owner: { type: string, description: "The login whose lead agent this is; empty for a task's session." }
|
||||
vendor: { type: string, enum: [claude, codex], description: "Follows from the model the session was created with: gpt-* models run on Codex, every other model on Claude Code." }
|
||||
model: { type: string, description: "Requested model; empty means the vendor's default. A session only switches between its own vendor's models." }
|
||||
@@ -1531,6 +1565,12 @@ components:
|
||||
type: string
|
||||
description: Model for this turn and later ones. When it differs from the session's model, the session switches before the message is sent.
|
||||
|
||||
BoardPostCreate:
|
||||
type: object
|
||||
required: [text]
|
||||
properties:
|
||||
text: { type: string }
|
||||
|
||||
CompactCreate:
|
||||
type: object
|
||||
properties:
|
||||
@@ -1706,8 +1746,8 @@ components:
|
||||
|
||||
TaskTab:
|
||||
type: string
|
||||
enum: [transcript, changes, files, terminal, inbox, reviews, workflow, project]
|
||||
x-enum-varnames: [TabTranscript, TabChanges, TabFiles, TabTerminal, TabInbox, TabReviews, TabWorkflow, TabProject]
|
||||
enum: [transcript, board, changes, files, terminal, inbox, reviews, workflow, project]
|
||||
x-enum-varnames: [TabTranscript, TabBoard, TabChanges, TabFiles, TabTerminal, TabInbox, TabReviews, TabWorkflow, TabProject]
|
||||
|
||||
TerminalSize:
|
||||
type: object
|
||||
|
||||
Reference in New Issue
Block a user