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

Function newMemoryRecallCommand

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

Source from the content-addressed store, hash-verified

776}
777
778func newMemoryRecallCommand(deps commandDeps) *cobra.Command {
779 cmd := &cobra.Command{
780 Use: "recall",
781 Short: "Inspect Memory v2 recall traces",
782 }
783 cmd.AddCommand(&cobra.Command{
784 Use: "trace <session_id> <turn_seq>",
785 Short: "Show one redaction-safe recall trace",
786 Args: cobra.ExactArgs(2),
787 RunE: func(cmd *cobra.Command, args []string) error {
788 client, err := clientFromDeps(deps)
789 if err != nil {
790 return err
791 }
792 turnSeq, err := strconv.ParseInt(strings.TrimSpace(args[1]), 10, 64)
793 if err != nil || turnSeq <= 0 {
794 return errors.New("memory.recall.turn_seq_invalid: turn_seq must be a positive integer")
795 }
796 response, err := client.GetMemoryRecallTrace(cmd.Context(), strings.TrimSpace(args[0]), turnSeq)
797 if err != nil {
798 return err
799 }
800 return writeCommandOutput(cmd, memoryObjectBundle("Memory Recall Trace", response))
801 },
802 })
803 return cmd
804}
805
806func newMemoryDreamCommand(deps commandDeps) *cobra.Command {
807 cmd := &cobra.Command{

Callers 1

newMemoryCommandFunction · 0.85

Calls 4

clientFromDepsFunction · 0.85
writeCommandOutputFunction · 0.85
memoryObjectBundleFunction · 0.85
GetMemoryRecallTraceMethod · 0.65

Tested by

no test coverage detected