Conversation
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.
There was a problem hiding this comment.
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 statussubcommand in the memory CLI command group. - Add a
cmd_memory_status_clihandler that callsvalence.mcp.handlers.memory.memory_status()and outputs the result.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| 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 |
There was a problem hiding this comment.
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.
| 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 |
There was a problem hiding this comment.
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).
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.