(deps commandDeps)
| 776 | } |
| 777 | |
| 778 | func 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 | |
| 806 | func newMemoryDreamCommand(deps commandDeps) *cobra.Command { |
| 807 | cmd := &cobra.Command{ |
no test coverage detected