fix classifyNamespace: person-side categories (profiles/heart/flag/cares) must go to soulful namespace

This commit is contained in:
小唯
2026-09-19 23:49:08 +08:00
parent 21e51eb7f6
commit ab974d0bed
+8
View File
@@ -730,6 +730,14 @@ func classifyNamespace(category, agentID, content string) string {
// 如果显式传入 namespace 且非空,信任调用方
// (此函数仅在 namespace 为空时调用)
// 规则0:人侧数据(画像/心迹/牵挂/偏好/习惯/目标)永远归 agent 私有灵魂 namespace
// 这是灵魂侧直写统一用的 namespace(soulful-xiaowei),必须与 commit 端点一致,
// 否则蒸馏产物放 a06-main、灵魂侧直写放 soulful-xiaowei,两边永远比对不到。
switch category {
case "profiles", "heart", "flag", "cares", "preferences", "habits", "goals":
return deriveNamespace("soulful-xiaowei")
}
// 规则1:已知共享 category → shared
if sharedCategories[category] {
return "shared"