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
fix(team): resolve tenant model config and align workspace mount paths
DL123236903057c177
diff --git a/jiuwenswarm/agents/harness/team/rails/team_workspace_report_path_rail.py b/jiuwenswarm/agents/harness/team/rails/team_workspace_report_path_rail.pyindex d7c583f6b5..2234f5923f 100644--- a/jiuwenswarm/agents/harness/team/rails/team_workspace_report_path_rail.py+++ b/jiuwenswarm/agents/harness/team/rails/team_workspace_report_path_rail.py@@ -42,7 +42,7 @@ class TeamWorkspaceReportPathRail(DeepAgentRail):if self.system_prompt_builder is None:return- mount = f".team/{self._team_id}/" if self._team_id else ".team/"+ mount = ".team/"sample = str(Path(self._root_dir) / "prd-review-memo.md")content = ("# Team Workspace Artifact Paths\n\n"@@ -55,8 +55,8 @@ class TeamWorkspaceReportPathRail(DeepAgentRail):"deliver the file and must not replace `send_file_to_user`.\n""- After `send_file_to_user` succeeds, report the real absolute filesystem path under the team ""workspace absolute root, not the `.team/...` mount path.\n"- "- If a generated artifact path contains `.team/<team>/team-workspace/`, remove that mount prefix and "- "join the remaining file name under the team workspace absolute root before sending and reporting it.\n"+ "- The mount is already the shared workspace root; do not add a team id or `team-workspace` "+ "segment after `.team/`.\n"f"- Example absolute path to pass to `send_file_to_user`: `{sample}`\n")self.system_prompt_builder.add_section(diff --git a/tests/agents/swarm/test_swarm_assembly.py b/tests/agents/swarm/test_swarm_assembly.pyindex b2eba8eeaa..f8404984cd 100644--- a/tests/agents/swarm/test_swarm_assembly.py+++ b/tests/agents/swarm/test_swarm_assembly.py@@ -1211,6 +1211,28 @@ def test_team_workspace_report_path_returns_none_without_root() -> None:assert member_rails._build_team_workspace_report_path_rail({}, ctx) is None+async def test_team_workspace_report_path_uses_flat_mount_with_team_id() -> None:+ """A session-scoped team id must not be repeated inside the mount path."""+ team_id = "oc_team_preset-research-insight_officeclaw_1a03cd0f2a9_26b2ec1a2e78"+ ctx = SwarmBuildContext(+ team_ws_root=r"C:\Users\tester\.office-claw\agent_teams\team\team-workspace",+ team_id=team_id,+ )+ rail = member_rails._build_team_workspace_report_path_rail({}, ctx)+ assert rail is not None+ builder = SystemPromptBuilder(language="cn")+ rail.init(types.SimpleNamespace(system_prompt_builder=builder))++ await rail.before_model_call(+ AgentCallbackContext(agent=None, inputs=None, session=None)+ )++ prompt = builder.build()+ assert "Internal mount path: `.team/`" in prompt+ assert f".team/{team_id}/" not in prompt+ assert ".team/<team>/team-workspace/" not in prompt++# ---------------------------------------------------------------------------# Multimodal / xiaoyi tool gating (config-sourced base tools)# ---------------------------------------------------------------------------