feat(memory): add user_namespace and working memory config fields

This commit is contained in:
William Valentin
2026-02-25 12:53:58 -08:00
parent ed53d6d215
commit 64ebc636c1
+11
View File
@@ -610,6 +610,17 @@ const memorySchema = z.object({
max_context_tokens: z.number().min(100).max(10000).default(2000),
embedding: embeddingSchema,
qmd: qmdSchema,
/**
* When set, all channels share user/* memory (unified identity namespace).
* Absent = current session-scoped behavior, unchanged.
*/
user_namespace: z.string().optional(),
/** How long working memory remains valid after the last compaction (days). */
working_memory_ttl_days: z.number().min(1).max(365).default(14),
/** Token budget for working memory injection at session start. */
working_memory_max_tokens: z.number().min(100).max(4000).default(1000),
/** When true, instruct the model to acknowledge prior context on session start. */
proactive_session_greeting: z.boolean().default(false),
}).default({});
const compactionSchema = z.object({