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

Function newTaskProfileUpdateCommand

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

Source from the content-addressed store, hash-verified

688}
689
690func newTaskProfileUpdateCommand(deps commandDeps) *cobra.Command {
691 var profileRaw string
692 cmd := &cobra.Command{
693 Use: taskUpdateIDValue,
694 Short: "Replace one task execution profile",
695 Args: exactOneNonBlankArg(),
696 RunE: func(cmd *cobra.Command, args []string) error {
697 client, err := clientFromDeps(deps)
698 if err != nil {
699 return err
700 }
701 request, err := buildTaskExecutionProfileRequest(args[0], profileRaw)
702 if err != nil {
703 return err
704 }
705 profile, err := client.SetTaskExecutionProfile(cmd.Context(), args[0], request)
706 if err != nil {
707 return err
708 }
709 return writeCommandOutput(cmd, taskExecutionProfileBundle(&profile))
710 },
711 }
712 cmd.Flags().StringVar(&profileRaw, taskProfileKey, "", "Task execution profile JSON")
713 mustMarkFlagRequired(cmd, taskProfileKey)
714 return cmd
715}
716
717func newTaskProfileDeleteCommand(deps commandDeps) *cobra.Command {
718 return &cobra.Command{

Callers 1

newTaskProfileCommandFunction · 0.85

Calls 7

exactOneNonBlankArgFunction · 0.85
clientFromDepsFunction · 0.85
writeCommandOutputFunction · 0.85
mustMarkFlagRequiredFunction · 0.85

Tested by

no test coverage detected