(deps commandDeps)
| 229 | } |
| 230 | |
| 231 | func newTaskCommand(deps commandDeps) *cobra.Command { |
| 232 | cmd := &cobra.Command{ |
| 233 | Use: taskTaskKey, |
| 234 | Short: "Manage tasks and task runs", |
| 235 | Example: ` # Create durable task intent without starting execution |
| 236 | agh task create --scope workspace --workspace checkout-api --title "Audit auth flow" |
| 237 | |
| 238 | # Explicitly enqueue execution for an existing task |
| 239 | agh task start task-123 --channel coord-run-123 |
| 240 | |
| 241 | # Let the current agent session claim work |
| 242 | agh task next --wait`, |
| 243 | RunE: func(cmd *cobra.Command, _ []string) error { |
| 244 | return cmd.Help() |
| 245 | }, |
| 246 | } |
| 247 | |
| 248 | cmd.AddCommand(newTaskListCommand(deps)) |
| 249 | cmd.AddCommand(newTaskCreateCommand(deps)) |
| 250 | cmd.AddCommand(newTaskGetCommand(deps)) |
| 251 | cmd.AddCommand(newTaskInspectCommand(deps)) |
| 252 | cmd.AddCommand(newTaskUpdateCommand(deps)) |
| 253 | cmd.AddCommand(newTaskDeleteCommand(deps)) |
| 254 | cmd.AddCommand(newTaskProfileCommand(deps)) |
| 255 | cmd.AddCommand(newTaskReviewCommand(deps)) |
| 256 | cmd.AddCommand(newTaskNotificationCommand(deps)) |
| 257 | cmd.AddCommand(newTaskPublishCommand(deps)) |
| 258 | cmd.AddCommand(newTaskStartCommand(deps)) |
| 259 | cmd.AddCommand(newTaskApproveCommand(deps)) |
| 260 | cmd.AddCommand(newTaskRejectCommand(deps)) |
| 261 | cmd.AddCommand(newTaskCancelCommand(deps)) |
| 262 | cmd.AddCommand(newTaskBlockCommand(deps)) |
| 263 | cmd.AddCommand(newTaskUnblockCommand(deps)) |
| 264 | cmd.AddCommand(newTaskBlocksCommand(deps)) |
| 265 | cmd.AddCommand(newTaskNextCommand(deps)) |
| 266 | cmd.AddCommand(newTaskHeartbeatCommand(deps)) |
| 267 | cmd.AddCommand(newTaskCompleteCommand(deps)) |
| 268 | cmd.AddCommand(newTaskFailCommand(deps)) |
| 269 | cmd.AddCommand(newTaskReleaseCommand(deps)) |
| 270 | cmd.AddCommand(newTaskRetryCommand(deps)) |
| 271 | cmd.AddCommand(newTaskRecoverCommand(deps)) |
| 272 | cmd.AddCommand(newTaskPauseCommand(deps)) |
| 273 | cmd.AddCommand(newTaskResumeCommand(deps)) |
| 274 | cmd.AddCommand(newTaskPromoteCommand(deps)) |
| 275 | cmd.AddCommand(newTaskFanOutCommand(deps)) |
| 276 | cmd.AddCommand(newTaskChildCommand(deps)) |
| 277 | cmd.AddCommand(newTaskDependencyCommand(deps)) |
| 278 | cmd.AddCommand(newTaskRunCommand(deps)) |
| 279 | return cmd |
| 280 | } |
| 281 | |
| 282 | func newTaskListCommand(deps commandDeps) *cobra.Command { |
| 283 | var ( |
no test coverage detected