cli: show memory plugins in openclaw memory status

Detect configured memory plugins (memory-neo4j, memory-lancedb) and show
their status alongside core memory search. Provides helpful hints about
plugin-specific commands when plugins are enabled.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
Tarun Sukhani
2026-02-04 17:36:56 +00:00
parent e7ac300b7e
commit 007daf3c27

View File

@@ -546,6 +546,56 @@ export async function runMemoryStatus(opts: MemoryCommandOptions) {
);
defaultRuntime.log("");
}
// Detect configured memory plugins and show hints
const memoryPlugins = detectMemoryPlugins(cfg);
if (memoryPlugins.length > 0) {
defaultRuntime.log(heading("Memory Plugins"));
for (const plugin of memoryPlugins) {
const statusText = plugin.enabled ? success("enabled") : muted("disabled");
defaultRuntime.log(`${info(plugin.id)} ${statusText}`);
if (plugin.hint) {
defaultRuntime.log(muted(`${plugin.hint}`));
}
}
defaultRuntime.log("");
}
}
type MemoryPluginInfo = {
id: string;
enabled: boolean;
hint?: string;
};
function detectMemoryPlugins(cfg: ReturnType<typeof loadConfig>): MemoryPluginInfo[] {
const plugins: MemoryPluginInfo[] = [];
const entries = cfg.plugins?.entries ?? {};
const activeSlot = cfg.plugins?.slots?.memory;
// Check for memory-neo4j plugin
if (entries["memory-neo4j"]) {
const entry = entries["memory-neo4j"];
const enabled = entry.enabled !== false && activeSlot !== "none";
plugins.push({
id: "memory-neo4j",
enabled,
hint: enabled ? "Run `openclaw memory neo4j stats` for detailed statistics" : undefined,
});
}
// Check for memory-lancedb plugin
if (entries["memory-lancedb"]) {
const entry = entries["memory-lancedb"];
const enabled = entry.enabled !== false && activeSlot !== "none";
plugins.push({
id: "memory-lancedb",
enabled,
hint: enabled ? "Run `openclaw memory lancedb stats` for detailed statistics" : undefined,
});
}
return plugins;
}
export function registerMemoryCli(program: Command) {