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

Function newMemoryHealthCommand

internal/cli/memory.go:512–533  ·  view source on GitHub ↗
(deps commandDeps)

Source from the content-addressed store, hash-verified

510}
511
512func newMemoryHealthCommand(deps commandDeps) *cobra.Command {
513 return &cobra.Command{
514 Use: memoryHealthKey,
515 Short: "Show Memory v2 health",
516 Args: cobra.NoArgs,
517 RunE: func(cmd *cobra.Command, _ []string) error {
518 client, err := clientFromDeps(deps)
519 if err != nil {
520 return err
521 }
522 workspace, err := currentWorkingDirectory(deps)
523 if err != nil {
524 return err
525 }
526 health, err := client.MemoryHealth(cmd.Context(), workspace)
527 if err != nil {
528 return err
529 }
530 return writeCommandOutput(cmd, memoryHealthBundle(health))
531 },
532 }
533}
534
535func newMemoryPromoteCommand(deps commandDeps) *cobra.Command {
536 var flags memorySelectorFlags

Callers 1

newMemoryCommandFunction · 0.85

Calls 5

clientFromDepsFunction · 0.85
currentWorkingDirectoryFunction · 0.85
writeCommandOutputFunction · 0.85
memoryHealthBundleFunction · 0.85
MemoryHealthMethod · 0.65

Tested by

no test coverage detected