Add team tasks: several agents in one worktree sharing a board

This commit is contained in:
Ian Gulliver
2026-10-18 08:48:57 -07:00
parent 7f62df19d2
commit 6bcde13b2f
31 changed files with 1392 additions and 439 deletions
+18
View File
@@ -560,6 +560,24 @@ func (s *Server) DiscardTask(w http.ResponseWriter, r *http.Request, taskID stri
writeJSON(w, http.StatusAccepted, t)
}
func (s *Server) PostToBoard(w http.ResponseWriter, r *http.Request, taskID string) {
req := api.BoardPostCreate{}
if !readJSON(w, r, &req) {
return
}
t, _, ok := s.activeTask(w, r, taskID)
if !ok {
return
}
err := s.agents.Post(r.Context(), t, actor(r), req.Text)
if err != nil {
writeAgentError(w, err)
return
}
w.WriteHeader(http.StatusNoContent)
}
func (s *Server) activeTask(w http.ResponseWriter, r *http.Request, taskID string) (api.Task, api.Project, bool) {
t, err := s.store.GetTask(r.Context(), taskID)
if err != nil {