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(web): fix web jiuwenclaw-start failed
chenchunzhou0920428e01d4
diff --git a/docker/Dockerfile.claw b/docker/Dockerfile.clawindex 62369c35bc..540c1abfc6 100644--- a/docker/Dockerfile.claw+++ b/docker/Dockerfile.claw@@ -18,7 +18,7 @@ RUN npm run build# Install server dependenciesWORKDIR /app/jiuwenclawENV PATH=$PATH:/home/app/.local/bin-RUN sed -i '/--host/ s/default="localhost"/default="0.0.0.0"/' /app/jiuwenclaw/jiuwenclaw/app_web.py+RUN sed -i '/--host/ s/default="localhost"/default="0.0.0.0"/' /app/jiuwenclaw/jiuwenclaw/channels/web/app_web.pyRUN pip install -i https://pypi.tuna.tsinghua.edu.cn/simple -e ".[all]" --no-cache-dir# Start claw appdiff --git a/jiuwenclaw/agents/harness/team/team_manager.py b/jiuwenclaw/agents/harness/team/team_manager.pyindex 093711f317..499bd65bf2 100644--- a/jiuwenclaw/agents/harness/team/team_manager.py+++ b/jiuwenclaw/agents/harness/team/team_manager.py@@ -16,7 +16,7 @@ from typing import Any, Callablefrom openjiuwen.agent_teams.agent.team_agent import TeamAgentfrom openjiuwen.agent_teams.paths import team_homefrom openjiuwen.agent_teams.schema.blueprint import TeamAgentSpec-from openjiuwen.agent_teams.spawn.context import reset_session_id, set_session_id+from openjiuwen.agent_teams.context import reset_session_id, set_session_idfrom openjiuwen.harness import DeepAgentfrom jiuwenclaw.agents.harness.team.bootstrap import configure_agent_teams_homediff --git a/jiuwenclaw/channels/web/app_web.py b/jiuwenclaw/channels/web/app_web.pyindex 86493150f5..2253423c2a 100644--- a/jiuwenclaw/channels/web/app_web.py+++ b/jiuwenclaw/channels/web/app_web.py@@ -34,32 +34,26 @@ from jiuwenclaw.common.utils import get_agent_root_dir, get_logs_dir, \def _get_package_dir() -> Path:- """Get the jiuwenclaw package directory (for package-internal files)."""- if is_package_installation():- # In package mode, app_web.py is at site-packages/jiuwenclaw/app_web.py- # So parent is site-packages/jiuwenclaw/- return Path(__file__).resolve().parent- else:- # In source mode, app_web.py is at <repo>/jiuwenclaw/app_web.py- # So parent is <repo>/jiuwenclaw/- return Path(__file__).resolve().parent+ """Get the jiuwenclaw/channels/web package directory."""+ # app_web.py is at jiuwenclaw/channels/web/app_web.py+ # So parent is jiuwenclaw/channels/web/+ return Path(__file__).resolve().parentdef _default_dist_dir() -> Path:- """Return default dist directory for local repo layout."""+ """Return default dist directory for frontend static files."""+ # Priority 1: user workspace channels/web/frontend/distroot = get_root_dir()- # Try user workspace web/dist first (if copied from package)- if (root / "web" / "dist").exists():- return root / "web" / "dist"- # Try package internal web/dist (package installation)+ user_dist = root / "channels" / "web" / "frontend" / "dist"+ if user_dist.exists():+ return user_dist+ # Priority 2: package internal channels/web/frontend/distpackage_dir = _get_package_dir()- if (package_dir / "web" / "dist").exists():- return package_dir / "web" / "dist"- # Try source mode frontend/dist (in-source development)- if (package_dir / "frontend" / "dist").exists():- return package_dir / "frontend" / "dist"- # Fallback- return root / "web" / "dist"+ dist_dir = package_dir / "frontend" / "dist"+ if dist_dir.exists():+ return dist_dir+ # Fallback: return package internal path+ return dist_dirdef _normalize_lang_suffix(name: str) -> str:diff --git a/pyproject.toml b/pyproject.tomlindex 6abbb62d11..0643ab6544 100644--- a/pyproject.toml+++ b/pyproject.toml@@ -84,8 +84,8 @@ namespaces = false[tool.setuptools.package-data]"*" = ["LICENSE"]jiuwenclaw = [- "web/dist/**/*",- "web/dist/*",+ "channels/web/frontend/dist/**/*",+ "channels/web/frontend/dist/*",# config / env 模板放在 resources 目录"resources/**/*","resources/*",@@ -93,7 +93,7 @@ jiuwenclaw = [][tool.setuptools.exclude-package-data]-jiuwenclaw = ["web/node_modules/**", "web/node_modules/*"]+jiuwenclaw = ["channels/web/frontend/node_modules/**", "channels/web/frontend/node_modules/*"][tool.uv.sources]jiuwenclaw-tui = { path = "./packages/jiuwenclaw-tui" }diff --git a/tests/ui_e2e/cron_ui_report.py b/tests/ui_e2e/cron_ui_report.pyindex 1d83c05043..33c4d5536e 100644--- a/tests/ui_e2e/cron_ui_report.py+++ b/tests/ui_e2e/cron_ui_report.py@@ -32,12 +32,11 @@ except ImportError:resolve_runtime_python,)-UI_E2E_ROOT = Path(__file__).resolve().parentREPO_ROOT = Path(__file__).resolve().parents[2]-WEB_DIR = REPO_ROOT / "jiuwenclaw" / "web"+WEB_DIR = REPO_ROOT / "jiuwenclaw" / "channels" / "web"WEB_DIST_DIR = WEB_DIR / "dist"-APP_WEB = REPO_ROOT / "jiuwenclaw" / "app_web.py"+APP_WEB = REPO_ROOT / "jiuwenclaw" / "channels" / "web" / "app_web.py"DEFAULT_HOME = Path.home()diff --git a/tests/ui_e2e/todo_ui_report.py b/tests/ui_e2e/todo_ui_report.pyindex b90fd03ef7..e6e93ae6e9 100644--- a/tests/ui_e2e/todo_ui_report.py+++ b/tests/ui_e2e/todo_ui_report.py@@ -31,12 +31,11 @@ except ImportError:resolve_runtime_python,)-UI_E2E_ROOT = Path(__file__).resolve().parentREPO_ROOT = Path(__file__).resolve().parents[2]-WEB_DIR = REPO_ROOT / "jiuwenclaw" / "web"+WEB_DIR = REPO_ROOT / "jiuwenclaw" / "channels" / "web"WEB_DIST_DIR = WEB_DIR / "dist"-APP_WEB = REPO_ROOT / "jiuwenclaw" / "app_web.py"+APP_WEB = REPO_ROOT / "jiuwenclaw" / "channels" / "web" / "app_web.py"DEFAULT_HOME = Path.home()diff --git a/uv.lock b/uv.lockindex eb0bf7fa31..02de88ea31 100644--- a/uv.lock+++ b/uv.lock@@ -2325,7 +2325,7 @@ wheels = [[[package]]name = "openjiuwen"version = "0.1.12"-source = { git = "https://gitcode.com/openJiuwen/agent-core.git?rev=develop#ec1e3f717471bb8950ffc2b2f8c319d447a680df" }+source = { git = "https://gitcode.com/openJiuwen/agent-core.git?rev=develop#3d1334c41c0a39f7326dc457b18cfa268c7325e8" }dependencies = [{ name = "aiofiles" },{ name = "aiohttp" },