# Changelog v1.0.4

Record image-affecting changes to `manager/`, `worker/`, `openclaw-base/` here before the next release.

---

**What's New**

- Added CoPaw Worker container support — new `copaw/Dockerfile`, container lifecycle management (`container_create_copaw_worker`), random host port assignment with auto-retry on conflict, and on-demand web console toggle (`enable-worker-console.sh`, saves ~500MB RAM when disabled).
- Added CoPaw Worker runtime package (`copaw-worker` CLI) that bridges openclaw.json → CoPaw config, implements MatrixChannel for Matrix communication, syncs config/skills from MinIO, and supports bidirectional file sync (remote→local + local→MinIO push loop).
- Added CoPaw remote deployment mode (`--runtime copaw --remote`) — installs the Worker directly on the user's local machine via pip, enabling tasks that require local environment access (e.g., opening a browser, running desktop apps, accessing local files). Remote copaw installs auto-include `--console-port 8088` by default.
- Added worker runtime selection prompt to install scripts — users choose between OpenClaw (~500MB) and CoPaw (~150MB) during installation; default runtime stored in `HICLAW_DEFAULT_WORKER_RUNTIME` env var and used by `create-worker.sh`.
- Extracted worker model switch into standalone `worker-model-switch` skill.
- Added AI identity section to SOUL.md and User-Agent header (HiClaw/\<version\>) to AI route.

**Bug Fixes**

- Fixed CoPaw `bridge.py` path constants causing 401 AuthenticationError on LLM calls, and Podman container detection (`/run/.containerenv`) causing Matrix connection timeout.
- Fixed CoPaw MatrixChannel not mentioning sender in replies (manager ignored worker replies).
- Unified worker file-sync notification and task/project notification paths to work with both OpenClaw and CoPaw runtimes.
- Fixed model `input` field to be dynamic based on model vision capability instead of hardcoded.
- Fixed container timezone configuration from TZ env var.

---

**新增功能**

- CoPaw Worker 容器化支持 — 新增 `copaw/Dockerfile`、容器生命周期管理（`container_create_copaw_worker`）、随机 host port 分配与端口冲突自动重试、按需开关 Web 控制台（`enable-worker-console.sh`，关闭时节省约 500MB 内存）。
- CoPaw Worker 运行时包（`copaw-worker` CLI）— 桥接 openclaw.json 到 CoPaw 配置、实现 MatrixChannel 通信、从 MinIO 同步配置和技能、支持双向文件同步（远程→本地 + 本地→MinIO 推送）。
- CoPaw 远程部署模式（`--runtime copaw --remote`）— 通过 pip 将 Worker 安装在用户本地机器上，支持需要访问本地环境的任务（如打开浏览器、运行桌面应用、访问本地文件）。远程 copaw 安装命令默认自带 `--console-port 8088`。
- 安装脚本新增 Worker 运行时选择提示 — 用户在安装时选择 OpenClaw（约 500MB）或 CoPaw（约 150MB），默认运行时存入 `HICLAW_DEFAULT_WORKER_RUNTIME` 环境变量，`create-worker.sh` 自动使用。
- Worker 模型切换拆分为独立 `worker-model-switch` skill。
- SOUL.md 新增 AI 身份声明，AI 路由新增 User-Agent 头（HiClaw/\<version\>）。

**Bug 修复**

- 修复 CoPaw `bridge.py` 路径常量导致 LLM 调用 401 认证错误，以及 Podman 容器环境检测（`/run/.containerenv`）导致 Matrix 连接超时。
- 修复 CoPaw MatrixChannel 回复未携带发送者信息（Manager 忽略 Worker 回复）。
- 统一 Worker 文件同步通知和任务/项目通知路径，兼容 OpenClaw 和 CoPaw 两种运行时。
- 修复模型 `input` 字段根据视觉能力动态设置，不再硬编码。
- 修复容器时区配置（通过 TZ 环境变量）。

---

- feat(manager): add AI identity section to Manager and Worker SOUL.md templates, ensuring agents understand they are AI not human and can work continuously ([ecca010](https://github.com/higress-group/hiclaw/commit/ecca010))
- fix: set container timezone from TZ env var in both Manager and Worker (install tzdata in base image, configure /etc/localtime and /etc/timezone at startup)
- feat(manager): add User-Agent header (HiClaw/<version>) to default AI route via headerControl, and send it in LLM connectivity tests ([3242d06](https://github.com/higress-group/hiclaw/commit/3242d0630d196c35b5df6fd6fbd7ac6e6b72c08a))
- feat(openclaw-base): install cron package in base image, start crond in Manager (supervisord) and Worker (entrypoint)
- fix(manager): unify worker file-sync notification — replace runtime-specific `hiclaw-sync` command with generic "use your file-sync skill" message in `lifecycle-worker.sh`, `push-worker-skills.sh`, `create-worker.sh`, and `start-manager-agent.sh`; update `worker-management/SKILL.md` accordingly
- fix(manager): fix `create-worker.sh` to push runtime-specific `AGENTS.md` for copaw workers instead of always using openclaw's `worker-agent/AGENTS.md`
- feat(manager): add `copaw-worker-agent/AGENTS.md` describing copaw worker workspace layout and MinIO-based file access (no `~/hiclaw-fs/` mount)
- fix(manager): update task/project notification messages in `task-management/SKILL.md` and `project-management/SKILL.md` to use MinIO paths (`hiclaw/hiclaw-storage/...`) instead of local `~/hiclaw-fs/` paths, compatible with both openclaw and copaw workers
- fix(worker): update `file-sync/SKILL.md` to document MinIO→local path mapping so worker knows where to find files after `hiclaw-sync`
- fix(copaw): patch copaw module-level path constants (`WORKING_DIR`, `SECRET_DIR`, `_PROVIDERS_JSON`) at runtime in `bridge.py` so providers.json is written to and read from the correct worker-specific directory (fixes 401 AuthenticationError on LLM calls)
- feat(copaw): add `copaw/` package — HiClaw's CoPaw Worker runtime (`copaw-worker` CLI) that bridges openclaw.json → CoPaw config, implements MatrixChannel, and syncs config from MinIO
- fix(manager): copaw install command now uses `HICLAW_PORT_GATEWAY` (external port) instead of internal `:8080` so the command works on the host machine
- feat(copaw): add optional `--console-port` to copaw-worker; headless mode saves ~500MB RAM; startup prints memory tip in both cases; SKILL.md and create-worker.sh updated accordingly
- fix(copaw): fix MatrixChannel not mentioning sender in replies (missing `sender_id` in meta payload caused manager to ignore worker replies)
- feat(copaw): sync skills from MinIO on startup (`_sync_skills`)
- feat(copaw): rewrite `sync.py` to use mc CLI for all MinIO operations (mc cat, mc ls, mc alias set); remove httpx + AWS Signature V4 implementation
- feat(copaw): add CoPaw-specific file-sync skill (`manager/agent/copaw-worker-agent/skills/file-sync/`) with `copaw-sync.py` script for manual sync trigger; `create-worker.sh` selects runtime-specific file-sync skill from `/opt/hiclaw/agent/copaw-worker-agent/` for copaw runtime
- feat(copaw): add local→MinIO change-triggered push loop (`push_loop` / `push_local` in `sync.py`); started alongside the existing remote→local sync loop in `worker.py`; mirrors openclaw worker entrypoint behavior (5s poll, excludes `.copaw/` internals)
- fix(manager): add explicit runtime determination step (Step 0) to `worker-management/SKILL.md` so Manager auto-detects `--runtime copaw` from keywords like "copaw", "Python worker", "pip worker" in admin requests, preventing accidental openclaw container creation
- feat(manager): extract worker model switch into standalone `worker-model-switch` skill (SKILL.md + `update-worker-model.sh`); remove `update-model` action from `lifecycle-worker.sh` and model-related docs from `worker-management/SKILL.md`
- feat(copaw): seed CoPaw built-in skills (pdf, xlsx, docx, etc.) as base layer before overlaying Manager-pushed skills from MinIO in `_sync_skills`
- fix(manager): make model `input` field dynamic instead of hardcoded `["text", "image"]` — deepseek, glm-5, MiniMax-M2.5, kimi-k2.5 and default models now correctly get `["text"]` only; affects both json templates, model-switch scripts, and worker config generation
- feat(copaw): add `copaw/Dockerfile` and entrypoint for building `hiclaw/copaw-worker` container image; add `container_create_copaw_worker` in `container-api.sh` with random host port (10000-20000) and auto-retry on port conflict ([810d21a](https://github.com/alibaba/hiclaw/commit/810d21a))
- feat(manager): add `enable-worker-console.sh` to enable/disable CoPaw web console on demand by recreating the container (~500MB RAM saved when disabled) ([810d21a](https://github.com/alibaba/hiclaw/commit/810d21a))
- feat(manager): `create-worker.sh` defaults to `HICLAW_DEFAULT_WORKER_RUNTIME` env var; remote copaw installs auto-include `--console-port 8088` ([810d21a](https://github.com/alibaba/hiclaw/commit/810d21a))
- feat(install): add worker runtime selection prompt (OpenClaw ~500MB vs CoPaw ~150MB) to both bash and PowerShell install scripts; write `HICLAW_DEFAULT_WORKER_RUNTIME` to env file ([810d21a](https://github.com/alibaba/hiclaw/commit/810d21a))
- fix(copaw): detect Podman containers via `/run/.containerenv` in `bridge.py` (fixes Matrix connection timeout in Podman deployments) ([810d21a](https://github.com/alibaba/hiclaw/commit/810d21a))
