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

Function newSessionHealthCommand

internal/cli/authored_context.go:733–752  ·  view source on GitHub ↗
(deps commandDeps)

Source from the content-addressed store, hash-verified

731}
732
733func newSessionHealthCommand(deps commandDeps) *cobra.Command {
734 cmd := &cobra.Command{
735 Use: "health <session-id>",
736 Short: "Read session health and wake eligibility",
737 Example: " agh session health sess_123 --json",
738 Args: exactOneNonBlankArg(),
739 RunE: func(cmd *cobra.Command, args []string) error {
740 client, err := clientFromDeps(deps)
741 if err != nil {
742 return err
743 }
744 record, err := client.GetSessionHealth(cmd.Context(), args[0])
745 if err != nil {
746 return err
747 }
748 return writeCommandOutput(cmd, sessionHealthBundle(record))
749 },
750 }
751 return cmd
752}
753
754func newSessionInspectCommand(deps commandDeps) *cobra.Command {
755 var includeEvents bool

Callers 1

newSessionCommandFunction · 0.85

Calls 5

exactOneNonBlankArgFunction · 0.85
clientFromDepsFunction · 0.85
writeCommandOutputFunction · 0.85
sessionHealthBundleFunction · 0.85
GetSessionHealthMethod · 0.65

Tested by

no test coverage detected