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(server): 针对xiaoyi_claw的环境 进行patch
xiaotian077a038340d5aa9
diff --git a/jiuwenswarm/server/app_agentserver.py b/jiuwenswarm/server/app_agentserver.pyindex 985a964331..4ac700f951 100644--- a/jiuwenswarm/server/app_agentserver.py+++ b/jiuwenswarm/server/app_agentserver.py@@ -144,9 +144,33 @@ from jiuwenswarm.agents.harness.common.tools.bash_tool_safety import (install_shell_tool_safety_hooks()# 兼容 SSE-only 网关:让非流式 invoke()(subagent / 心跳等)能解析 text/event-stream 响应+# 仅当 channels.xiaoyi.mode == xiaoyi_claw 时才打补丁(该网关以 SSE-only 方式返回非流式响应)。from jiuwenswarm.llm_sse_patch import apply_openai_sse_invoke_patch-apply_openai_sse_invoke_patch()++def _should_apply_sse_invoke_patch() -> bool:+ """检测 channels.xiaoyi.mode 是否为 xiaoyi_claw。"""+ try:+ from jiuwenswarm.common.config import get_config++ mode = (+ get_config()+ .get("channels", {})+ .get("xiaoyi", {})+ .get("mode")+ )+ except Exception as exc: # noqa: BLE001 - 启动早期读配置失败时保守兜底+ logger.warning(+ "[app_agentserver] 读取 channels.xiaoyi.mode 失败,默认应用 SSE 兼容补丁: %s",+ exc,+ )+ return True++ return str(mode or "").strip() == "xiaoyi_claw"+++if _should_apply_sse_invoke_patch():+ apply_openai_sse_invoke_patch()# [PERF 实验] 企业版 + symphony 关闭时短路 evolution rail 轨迹 drainfrom jiuwenswarm.perf.evolution_rail_short_circuit import (