12 Commits

Author SHA1 Message Date
狼哥
f92c54f371 fix: support OPENCLAW_HOME env var (#275)
fix: support OPENCLAW_HOME for non-standard OpenClaw paths\n\nAdds get_openclaw_home() helper in scripts/utils.py and updates all\ninstall/runtime scripts to resolve OpenClaw home from OPENCLAW_HOME\nenvironment variable with fallback to ~/.openclaw.\n\nCloses #271
2026-04-10 00:55:27 +08:00
cft0808
7cb0a6ad12 feat: multi-workspace task data auto-detection + time parsing improvements
- Auto-detect task data dir from ~/.openclaw/workspace-*/data (#117)
- Score and select best task source (non-demo tasks preferred)
- Update healthz and live-status to use detected data dir
- Add robust parseDateFlexible() for timestamp handling (#67)
- Add UTF-8 encoding to file_lock reads for Windows compat (#96)
- Use absolute path in install.sh hint (#107)

Closes #117, Closes #107
2026-03-26 21:59:35 +08:00
Sliverp
55a1ab9d83 fix(install): support both models.json and auth-profiles.json for credential sync (#197)
OpenClaw ≥ 3.13 renamed the credential storage file from
`auth-profiles.json` to `models.json`. The `sync_auth()` function
only looked for the old filename, causing the API Key sync to fail
silently on newer OpenClaw installations.

The fix tries `models.json` first (new format) and falls back to
`auth-profiles.json` (old format), ensuring compatibility with both
old and new OpenClaw versions. The detected filename is also preserved
when copying to other agents.

Fixes #179
2026-03-25 22:18:41 +08:00
cft0808
02dfdcd8b0 fix: resolve open GitHub issues (#142 #139 #136 #131 #127 #124 #132 #125)
- install.sh: clean invalid binding 'pattern' field (Closes #142)
- server.py: make dispatch channel configurable via agent_config.json (Closes #139)
- server.py: add POST /api/set-dispatch-channel endpoint
- sync_agent_config.py: preserve dispatchChannel across syncs
- ModelConfig.tsx/api.ts: add dispatch channel selector UI
- install.ps1: add Windows PowerShell install script (Closes #136)
- Verify gongbu/bingbu SOUL.md are correct and consistent (Closes #131)
- Already fixed in prior commit: Closes #127, Closes #124, Closes #132, Closes #125
2026-03-16 22:08:33 +08:00
cft0808
689b1eafbf fix: 流程一致性审计修复 + 文档更新
状态机:
- kanban_update.py 新增 _VALID_TRANSITIONS 校验, 非法状态跳转被拒绝
- _STATE_AGENT_MAP['Taizi'] 从旧 ID 'main' 修正为 'taizi'

数据一致性:
- zaochao emoji 前后端统一为 📰 (store.ts + dashboard.html)
- zaochao org '朝报司' 修正为 '钦天监' (sync_from_openclaw_runtime.py)
- server.py _MIN_TITLE_LEN 10→6, 与 kanban_update.py 保持一致
- schema.json 从 v2 重写为 v3, 对齐实际 11 状态 + 14 字段 + 11 角色

安装:
- install.sh first_sync 补充 sync_officials_stats.py 调用

文档:
- README 新增朝堂议政面板说明 + 状态机校验说明 + install 步骤更新
- CONTRIBUTING 更新测试断言数 + 新增 court_discuss.py 条目
2026-03-16 00:19:57 +08:00
cft0808
b91675bc4c feat: 朝堂议政功能 + GitHub issues 批量优化
新增功能:
- 朝堂议政(Court Discussion): 多官员围绕议题展开部门视角讨论
  - 后端 court_discuss.py + 前端 CourtDiscussion.tsx
  - 集成 GitHub Copilot API (gpt-4o)
  - 各部门依据 SOUL.md 职责发表专业意见

GitHub Issues 修复:
- #127: 模型下拉列表自动合并 openclaw.json 已配置模型
- #83:  install.sh 安装时设置 sessions.visibility all
- #88:  install.sh 用 symlink 统一各 workspace 的 data/scripts
- #80:  调度器 stallThreshold 180s→600s, maxRetry 1→2
- #124: skill_manager 增加镜像回退 + 自定义 Hub URL
- #132: sync_from_openclaw_runtime 放宽过滤,保留 Review 状态任务
2026-03-14 23:57:24 +08:00
cft0808
6b3ab88128 refactor: 消除冗余I/O、去重复定义、补全测试覆盖
- kanban_update.py: 提取 _trigger_refresh(),消除 save(load()) 双重 I/O
  每次任务操作节省一次 fcntl 锁 + 读文件 + 写文件的冗余开销
- kanban_update.py + server.py: now_iso/read_json 统一从 utils 导入,
  删除本地重复实现,移除未使用的 datetime/atomic_json_write 导入
- server.py: 修复 yaml import 静默失败——分离 ImportError 与 YAML 语法错误,
  先做字符串结构校验(无需 PyYAML),再严格验证语法
- tests/test_kanban.py: 测试数从 3 增至 8,补全 cmd_flow/cmd_done/
  cmd_progress/cmd_todo/progress_log_capped 覆盖
- run_loop.sh: 补充第二参数(巡检间隔)文档注释
- install.sh: 删除 Python heredoc 中无效的 __file__ 判断死代码

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-07 22:18:11 +08:00
cft0808
7670460bde fix: install.sh 安装前自动备份已有 Agent 数据,防止覆盖用户配置
问题:社区反馈安装时覆盖了已有自定义 Agent(如龙虾角色)的 SOUL.md
修复:
- 新增 backup_existing() 步骤,安装前自动备份所有 workspace 到 ~/.openclaw/backups/
- create_workspaces() 覆盖 SOUL.md 前先备份旧文件为 .bak
- 备份包含:workspace 目录、openclaw.json、agents 注册信息
- 输出恢复命令提示,方便用户回滚
2026-03-02 23:07:25 +08:00
cft0808
709e163932 feat: 添加远程 Skills 资源管理功能
新增远程 skill 管理系统,支持从 GitHub/HTTPS URL 获取:
- API 端点: add-remote-skill, remote-skills-list, update-remote-skill, remove-remote-skill
- CLI 工具: scripts/skill_manager.py (add-remote, list-remote, update-remote, remove-remote, import-official-hub)
- 文档: remote-skills-guide.md 和 remote-skills-quickstart.md
- 功能: 安全验证、YAML 校验、版本管理、多渠道操作
2026-03-02 06:21:28 +08:00
cft0808
8ad2b512c3 fix: 对齐文档与OpenClaw实现链路(安装/同步/统计)
- install.sh: workspace与agent注册补齐太子/吏部/早朝
- sync_agent_config.py: 增加__main__入口,修正taizi映射,兼容model对象结构
- sync_officials_stats.py: 兼容model对象结构,修复TypeError,太子ID改为taizi并保留main兼容
- README_EN.md: 修正Quick Start里旧的9-workspace描述
2026-02-27 21:49:58 +08:00
cft0808
1110886de2 fix: 可移植性修复 + server.py 路由修复
- SOUL.md: 硬编码路径替换为 __REPO_DIR__ 占位符,支持跨环境部署
- dashboard/server.py: 修复 morning-brief/refresh 路由
  - 原错误:POST handler 混入 GET 分支导致永远 404
  - 修复:将 POST /api/morning-brief/refresh 移至 do_POST 正确位置
- scripts/: 路径变量改用 __file__ 相对路径,提升可移植性
- install.sh / run_loop.sh: 同步修复
2026-02-24 21:53:01 +08:00
cft0808
5b46f67603 🏛️ init: 三省六部 OpenClaw Multi-Agent Orchestration System
Features:
- 9 specialized agents (中书省·门下省·尚书省 + 六部)
- Real-time dashboard with 6 tabs (Overview/Kanban/History/Timeline/Models/Skills)
- Model configuration with live-apply via local API server
- One-click install script
- Data sync pipeline (15s refresh loop)
- Full audit trail via flow_log
2026-02-23 22:34:55 +08:00