Skip to content
This repository was archived by the owner on Mar 2, 2026. It is now read-only.

feat: add memory status CLI subcommand#586

Merged
zonk1024 merged 1 commit intomainfrom
fix/memory-status-cli
Feb 28, 2026
Merged

feat: add memory status CLI subcommand#586
zonk1024 merged 1 commit intomainfrom
fix/memory-status-cli

Conversation

@zonk1024
Copy link
Contributor

Adds valence memory status — was missing, causing the OpenClaw plugin to fall back to generic stats. Returns memory count (85), compiled articles (80), last memory timestamp, and tag distribution.

Adds 'valence memory status' command that reports memory count,
compiled articles, last memory timestamp, and top tags distribution.
Was missing — the OpenClaw plugin fell back to generic stats.
Copilot AI review requested due to automatic review settings February 28, 2026 21:26
@zonk1024 zonk1024 merged commit db0f616 into main Feb 28, 2026
6 checks passed
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Adds a missing valence memory status CLI subcommand so callers (e.g., OpenClaw plugin) can retrieve memory-system statistics rather than falling back to generic stats.

Changes:

  • Register a new memory status subcommand in the memory CLI command group.
  • Add a cmd_memory_status_cli handler that calls valence.mcp.handlers.memory.memory_status() and outputs the result.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment on lines +391 to +397
def cmd_memory_status_cli(args: argparse.Namespace) -> int:
"""Show memory system statistics."""
from valence.mcp.handlers.memory import memory_status

result = memory_status()
output_result(result)
return 0 if result.get("success") else 1
Copy link

Copilot AI Feb 28, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The new handler name cmd_memory_status_cli is inconsistent with the other handlers in this module (cmd_memory_list, cmd_memory_search, etc.). For consistency and discoverability (including test imports), consider renaming it to cmd_memory_status and updating set_defaults(func=...) accordingly.

Copilot uses AI. Check for mistakes.
Comment on lines +391 to +397
def cmd_memory_status_cli(args: argparse.Namespace) -> int:
"""Show memory system statistics."""
from valence.mcp.handlers.memory import memory_status

result = memory_status()
output_result(result)
return 0 if result.get("success") else 1
Copy link

Copilot AI Feb 28, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

valence memory status introduces new CLI behavior but there are existing CLI tests for other memory subcommands (see tests/cli/test_memory.py). Please add coverage for this handler (e.g., patch valence.mcp.handlers.memory.memory_status and assert output_result receives the returned dict, and that the exit code follows success).

Copilot uses AI. Check for mistakes.
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants