docs: hiclaw-controller 重构与 K8s 部署设计方案 || docs: hiclaw-controller reconstruction and K8s deployment design plan#551
Conversation
Design document covering: - hiclaw-controller separation as independent container (merged with docker-proxy) - WorkerBackend abstraction layer (Docker/K8s/ACK) - Pure Go reconcilers replacing bash scripts - Manager Agent optional deployment with clean responsibility separation - Team Leader heartbeat mechanism and worker lifecycle management with permission isolation - Manager/DebugWorker CRD definitions - DebugWorker with real-time workspace mounting and built-in debug-analysis skill - Helm Chart structure and values - Smooth upgrade mechanism: per-Worker/Team image upgrades, config hot-push via OSS - hiclaw CLI incluster mode with dual-mode ResourceClient Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
| # Team Leader 唤醒 Worker(仅限本 Team) | ||
| hiclaw worker wake --name alpha-dev --team alpha-team | ||
|
|
||
| # Team Leader 休眠 Worker(仅限本 Team) | ||
| hiclaw worker sleep --name alpha-dev --team alpha-team |
There was a problem hiding this comment.
唤醒和睡眠 worker 有什么应用场景吗?我的理解是 worker 不是一直就在那等着 manager 来分配任务吗?
There was a problem hiding this comment.
worker在没有任务的时候 idle一段时间可以把资源回收掉 例如不同职能的worker 时分复用同个资源
There was a problem hiding this comment.
worker 在没有任务的时候 idle 一段时间可以把资源回收掉
| ### 6.3 DebugWorker 核心设计 | ||
|
|
||
| DebugWorker 的核心能力是实时访问调试目标的所有成员工作目录,并通过内置的 debug skill 生成调试日志、结合源码分析问题。 | ||
|
|
||
| 工作目录实时挂载: | ||
|
|
||
| ``` | ||
| DebugWorker 容器内的目录结构: | ||
|
|
||
| /root/debug/ | ||
| ├── workspaces/ # 实时同步的目标成员工作目录(通过 mc mirror) | ||
| │ ├── alpha-lead/ # Team Leader 的完整工作目录 | ||
| │ │ ├── SOUL.md | ||
| │ │ ├── AGENTS.md | ||
| │ │ ├── team-state.json | ||
| │ │ ├── skills/ | ||
| │ │ ├── sessions/ # LLM 请求/响应日志 | ||
| │ │ └── memory/ | ||
| │ ├── alpha-dev/ # Worker 的完整工作目录 | ||
| │ │ ├── SOUL.md | ||
| │ │ ├── openclaw.json | ||
| │ │ ├── skills/ | ||
| │ │ ├── sessions/ | ||
| │ │ └── memory/ | ||
| │ └── alpha-qa/ | ||
| │ └── ... | ||
| ├── matrix-export/ # Matrix 消息导出(按需生成) | ||
| │ ├── team-room.json | ||
| │ ├── alpha-lead-room.json | ||
| │ └── alpha-dev-room.json | ||
| ├── hiclaw-source/ # hiclaw 指定版本的源码 | ||
| │ ├── manager/ | ||
| │ ├── hiclaw-controller/ | ||
| │ └── ... | ||
| └── output/ # debug skill 生成的分析报告 | ||
| └── debug-report-20260403.md | ||
| ``` |
There was a problem hiding this comment.
我在想是否有必要专门提供 DebugWorker CRD 用于排查问题:是不是可以直接把 debug 所需的目录开放给 manager,同时把 debug skill 也内置到 manager 里?这样一来,遇到需要排查的问题时,直接问 manager 就可以了。
如果还希望在 manager 本身也挂掉的情况下保留 debug 能力,我觉得可以再提供一个 skill 或者 plugin,让 Claude Code 能够自动进入进行排查。
There was a problem hiding this comment.
manager主要是在大规模worker场景下会产生瓶颈,此外就是不同team会给不同team admin(真人)权限,debug worker要隔离开权限。
| - debug-worker 镜像构建(内置源码 + debug-analysis skill) | ||
| - mc mirror 实时同步目标成员工作目录 | ||
| - Matrix 消息导出 + Session 日志分析 | ||
| - Team 默认 DebugWorker(spec.debug.enabled) |
There was a problem hiding this comment.
Team spec.debug.enabled 应该默认为 false ?保证数据安全性
There was a problem hiding this comment.
我考虑是默认开启,只要默认的allow user设置为team admin即可
…scope-ai#551) Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Summary
设计要点
Test plan
🤖 Generated with Claude Code
Summary
Design points
Test plan
🤖 Generated with Claude Code