fix(openclaw): skip runtime setup during metadata registration (#5383)
This commit is contained in:
@@ -107,6 +107,7 @@ const memoryPlugin = definePluginEntry({
|
||||
baseUrl: pluginAuth.baseUrl,
|
||||
};
|
||||
const cfg = mem0ConfigSchema.parse(api.pluginConfig, fileConfig);
|
||||
const isMetadataRegistration = api.registrationMode === "cli-metadata";
|
||||
|
||||
// Telemetry context bound to this plugin instance's config
|
||||
const telemetryCtx = {
|
||||
@@ -122,6 +123,21 @@ const memoryPlugin = definePluginEntry({
|
||||
}
|
||||
};
|
||||
|
||||
if (isMetadataRegistration) {
|
||||
registerCliCommands(
|
||||
api,
|
||||
null as any,
|
||||
null as any,
|
||||
cfg,
|
||||
() => cfg.userId,
|
||||
(id: string) => `${cfg.userId}:agent:${id}`,
|
||||
() => ({ user_id: cfg.userId, top_k: cfg.topK }),
|
||||
() => undefined,
|
||||
(cmd: string) => _captureEvent(`openclaw.cli.${cmd}`, { command: cmd }),
|
||||
);
|
||||
return;
|
||||
}
|
||||
|
||||
if (cfg.needsSetup) {
|
||||
api.logger.warn(
|
||||
"openclaw-mem0: API key not configured. Memory features are disabled.\n" +
|
||||
|
||||
Reference in New Issue
Block a user