MCPcopy Create free account
hub / github.com/compozy/agh / newTaskRecoverCommand

Function newTaskRecoverCommand

internal/cli/task.go:1544–1568  ·  view source on GitHub ↗
(deps commandDeps)

Source from the content-addressed store, hash-verified

1542}
1543
1544func newTaskRecoverCommand(deps commandDeps) *cobra.Command {
1545 var note string
1546 cmd := &cobra.Command{
1547 Use: "recover <id>",
1548 Short: "Recover a task from needs_attention",
1549 Args: exactOneNonBlankArg(),
1550 RunE: func(cmd *cobra.Command, args []string) error {
1551 client, err := clientFromDeps(deps)
1552 if err != nil {
1553 return err
1554 }
1555 recovered, err := client.RecoverTask(
1556 cmd.Context(),
1557 args[0],
1558 RecoverTaskRequest{Note: strings.TrimSpace(note)},
1559 )
1560 if err != nil {
1561 return err
1562 }
1563 return writeCommandOutput(cmd, taskBundle(&recovered))
1564 },
1565 }
1566 cmd.Flags().StringVar(&note, "note", "", "Optional recovery note")
1567 return cmd
1568}
1569
1570func newTaskNextCommand(deps commandDeps) *cobra.Command {
1571 var (

Callers 1

newTaskCommandFunction · 0.85

Calls 5

exactOneNonBlankArgFunction · 0.85
clientFromDepsFunction · 0.85
writeCommandOutputFunction · 0.85
taskBundleFunction · 0.85
RecoverTaskMethod · 0.65

Tested by

no test coverage detected