Self-evolving Context Database for AI Agents. Unify Agent Memory, Knowledge RAG and Skills.
Python agent-contextagent-memoryagent-pluginsagentic-ragcontext-databasedsh-pluginknowledge-basememorymemory-managementself-evolvingvector-database
fix(user_id): support dot (#1679)
Jiahui Zhou032ebbe5dff4
diff --git a/openviking_cli/session/user_id.py b/openviking_cli/session/user_id.pyindex 04ce3fb8b..4d50201ec 100644--- a/openviking_cli/session/user_id.py+++ b/openviking_cli/session/user_id.py@@ -1,6 +1,9 @@import hashlib+import loggingimport re+logger = logging.getLogger(__name__)+class UserIdentifier(object):def __init__(self, account_id: str, user_id: str, agent_id: str):@@ -10,6 +13,9 @@ class UserIdentifier(object):verr = self._validate_error()if verr:+ logger.error(+ f"Invalid user identifier: {verr}. account_id={self._account_id} user_id={self._user_id} agent_id={self._agent_id}"+ )raise ValueError(verr)@classmethod@@ -17,8 +23,8 @@ class UserIdentifier(object):return cls("default", default_username, "default")def _validate_error(self) -> str:- """Validate the user identifier. all fields must be non-empty strings, and chars only in [a-zA-Z0-9_-]."""- pattern = re.compile(r"^[a-zA-Z0-9_-]+$")+ """Validate the user identifier. all fields must be non-empty strings, and chars only in [a-zA-Z0-9_.-]."""+ pattern = re.compile(r"^[a-zA-Z0-9_.-]+$")if not self._account_id:return "account_id is empty"if not pattern.match(self._account_id):