From 57f944e18ad8ec3186297ea2caf7ff8e47ec3ec0 Mon Sep 17 00:00:00 2001 From: Parteeksachdeva <51407683+Parteeksachdeva@users.noreply.github.com> Date: Tue, 14 Apr 2026 17:31:28 +0530 Subject: [PATCH] fix: allow anonymousTelemetryId in openclaw.json config (#4826) Co-authored-by: parteeksachdeva-123 --- openclaw/config.ts | 5 +++++ openclaw/openclaw.plugin.json | 4 ++++ openclaw/tests/config.test.ts | 5 +++++ openclaw/types.ts | 1 + 4 files changed, 15 insertions(+) diff --git a/openclaw/config.ts b/openclaw/config.ts index 94cb1226c..32d6a8964 100644 --- a/openclaw/config.ts +++ b/openclaw/config.ts @@ -147,6 +147,7 @@ export const DEFAULT_CUSTOM_CATEGORIES: Record = { const ALLOWED_KEYS = [ "mode", "apiKey", + "anonymousTelemetryId", "baseUrl", "userId", "userEmail", @@ -215,6 +216,10 @@ export const mem0ConfigSchema = { return { mode, apiKey: resolvedApiKey, + anonymousTelemetryId: + typeof cfg.anonymousTelemetryId === "string" + ? cfg.anonymousTelemetryId + : undefined, baseUrl: resolvedBaseUrl, userId: typeof cfg.userId === "string" && cfg.userId diff --git a/openclaw/openclaw.plugin.json b/openclaw/openclaw.plugin.json index 6158c260c..5bafe6d46 100644 --- a/openclaw/openclaw.plugin.json +++ b/openclaw/openclaw.plugin.json @@ -134,6 +134,10 @@ "topK": { "type": "number" }, + "anonymousTelemetryId": { + "type": "string", + "description": "Persistent anonymous telemetry identifier" + }, "oss": { "type": "object", "properties": { diff --git a/openclaw/tests/config.test.ts b/openclaw/tests/config.test.ts index 7b420213a..6e99a0f39 100644 --- a/openclaw/tests/config.test.ts +++ b/openclaw/tests/config.test.ts @@ -88,6 +88,11 @@ describe("mem0ConfigSchema.parse() — defaults", () => { const cfg = mem0ConfigSchema.parse({ apiKey: "test-key" }); expect(cfg.skills).toBeUndefined(); }); + + it("allows anonymousTelemetryId", () => { + const cfg = mem0ConfigSchema.parse({ apiKey: "test-key", anonymousTelemetryId: "123" }); + expect(cfg.anonymousTelemetryId).toBe("123"); + }); }); // --------------------------------------------------------------------------- diff --git a/openclaw/types.ts b/openclaw/types.ts index 2e375739f..5aef97a4c 100644 --- a/openclaw/types.ts +++ b/openclaw/types.ts @@ -8,6 +8,7 @@ export type Mem0Config = { mode: Mem0Mode; // Platform-specific apiKey?: string; + anonymousTelemetryId?: string; baseUrl?: string; customInstructions: string; customCategories: Record;