JiuwenSwarm is an intelligent AI Agent built on openJiuwen. It extends the powerful capabilities of large language models directly to your fingertips through various communication apps you use daily.
Python
Merge branch 'dev-stable-memory' into dev-stable
zhouguohaof2081f7841a9
diff --cc jiuwenswarm/common/local_env_config.pyindex fd8866339d,b0763114c1..103b94cb3b--- a/jiuwenswarm/common/local_env_config.py+++ b/jiuwenswarm/common/local_env_config.py@@@ -108,8 -108,19 +108,20 @@@ BUSINESS_MIRROR_KEYS: frozenset[str] ="API_KEY","API_BASE","MEMORY_ENGINE",+ "MEMORY_EXTERNAL_PROVIDER",+ "MEMORY_USER_ID",+ "AGENTARTS_MEMORY_BASE_URL",+ "AGENTARTS_MEMORY_API_KEY",+ "AGENTARTS_MEMORY_SPACE_ID",+ "OFFICE_ACE_DEPLOYMENT",+ "OFFICE_ACE_USER_PROFILE_ENABLED",+ "OFFICE_ACE_USER_PROFILE_ENDPOINT",+ "OFFICE_ACE_USER_PROFILE_API_KEY",+ "OFFICE_ACE_USER_PROFILE_FETCH_INTERVAL",+ "OFFICE_ACE_USER_PROFILE_MAX_CHARS",+ "OFFICE_ACE_USER_PROFILE_TIMEOUT","EVOLUTION_ENABLED",+ "TTSE_ENABLED","EMBED_API_KEY","EMBED_API_BASE","EMBED_MODEL",diff --cc jiuwenswarm/server/runtime/agent_adapter/interface_code.pyindex 9df2c8c1be,e0f2dd9ec1..cafd2a2cfc--- a/jiuwenswarm/server/runtime/agent_adapter/interface_code.py+++ b/jiuwenswarm/server/runtime/agent_adapter/interface_code.py@@@ -633,9 -654,13 +642,13 @@@ class JiuwenSwarmCodeAdapter(JiuWenSwar_RailBuildInfo("_security_rail", self._build_security_rail),_RailBuildInfo("_lsp_rail", self._build_lsp_rail_via_config),_RailBuildInfo("_project_memory_rail", self._build_project_memory_rail),+ _RailBuildInfo(+ "_office_ace_user_profile_rail",+ self._build_office_ace_user_profile_rail,+ ),_RailBuildInfo("_permission_rail",- build_permission_rail,+ self._build_permission_rail_for_agent,{"config": config_base,"llm": self._model,diff --cc jiuwenswarm/server/runtime/agent_adapter/interface_deep.pyindex cc61e798f6,d16e8aa84e..7bf6f793ca--- a/jiuwenswarm/server/runtime/agent_adapter/interface_deep.py+++ b/jiuwenswarm/server/runtime/agent_adapter/interface_deep.py@@@ -2580,8 -2479,11 +2584,12 @@@ class JiuWenSwarmDeepAdapterself._audio_tools: list[Any] = []self._instance_overrides: dict[str, Any] = {}self._is_session_scoped_adapter: bool = False+ self._steering_control: SteeringSession | None = Noneself._parent_session_id: str | None = None+ # 业务对话 ID(thread_id):由 mark_as_session_scoped 从 bootstrap request 透传。+ # PC 端 OfficeAce 记忆 sync_turn 上报 pc-threads/{thread_id}/messages 用它,+ # 与 session_id(thread_id 的 sha256 哈希、不可逆)互为补充。+ self._parent_thread_id: str | None = None# Active request-scoped OfficeClaw MCP registration for this session# adapter. Used for safe short-name cleanup and diagnostics; invoke# allowlisting is enforced via bind_active_office_claw_mcp_tools.@@@ -10620,13 -10356,18 +10642,23 @@@)# 企业版:create_instance 时可带 request,按 params 加载企业配置并合并模型bootstrap_request = self._instance_overrides.pop("request", None)- if bootstrap_request is not None and is_enterprise():- await self._load_enterprise_config(bootstrap_request)+ result = await self._load_enterprise_config(+ bootstrap_request,+ base=config_base,+ )+ config_base = result.config+ if not is_enterprise():+ self._refresh_standard_agent_permissions_body(bootstrap_request)+ # OfficeAce memory:从 bootstrap request 提取业务对话 thread_id,+ # 供 _build_external_memory_rail 透传给 provider.sync_turn 上报+ # pc-threads/{thread_id}/messages。凭据不再走 per-session runtime_config+ # ——provider 直接读 config/env(无 pre-session 级别)。+ if bootstrap_request is not None:+ _btid = getattr(bootstrap_request, "thread_id", None)+ if isinstance(_btid, str) and _btid:+ self._parent_thread_id = _btid+ config_base = merge_memory_config_into_config(config_base)+ config_base = self._merge_enterprise_models_into_config(config_base)# 与模型槽位一致:Agent 级 permissions 模板在构建 rail 前绑定到 Tasktoken_perm_agent = self._bind_agent_permissions_base()try: