149 Commits

Author SHA1 Message Date
cft0808
14a2075577 Merge pull request #313 from cft0808/dependabot/github_actions/docker/login-action-4
ci(deps): bump docker/login-action from 3 to 4
2026-05-06 23:01:33 +08:00
cft0808
ba8a82170f Merge pull request #312 from cft0808/dependabot/github_actions/docker/metadata-action-6
ci(deps): bump docker/metadata-action from 5 to 6
2026-05-06 23:01:21 +08:00
cft0808
6bd8ffe7cb Merge pull request #311 from cft0808/dependabot/github_actions/docker/setup-qemu-action-4
ci(deps): bump docker/setup-qemu-action from 3 to 4
2026-05-06 23:01:08 +08:00
cft0808
27242b7864 Merge pull request #310 from cft0808/dependabot/github_actions/actions/setup-python-6
ci(deps): bump actions/setup-python from 5 to 6
2026-05-06 23:00:57 +08:00
dependabot[bot]
24d5cf17c8 ci(deps): bump docker/login-action from 3 to 4
Bumps [docker/login-action](https://github.com/docker/login-action) from 3 to 4.
- [Release notes](https://github.com/docker/login-action/releases)
- [Commits](https://github.com/docker/login-action/compare/v3...v4)

---
updated-dependencies:
- dependency-name: docker/login-action
  dependency-version: '4'
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2026-05-04 14:15:27 +00:00
dependabot[bot]
2f1b1ea7c6 ci(deps): bump docker/metadata-action from 5 to 6
Bumps [docker/metadata-action](https://github.com/docker/metadata-action) from 5 to 6.
- [Release notes](https://github.com/docker/metadata-action/releases)
- [Commits](https://github.com/docker/metadata-action/compare/v5...v6)

---
updated-dependencies:
- dependency-name: docker/metadata-action
  dependency-version: '6'
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2026-05-04 14:15:22 +00:00
dependabot[bot]
7d394e9619 ci(deps): bump docker/setup-qemu-action from 3 to 4
Bumps [docker/setup-qemu-action](https://github.com/docker/setup-qemu-action) from 3 to 4.
- [Release notes](https://github.com/docker/setup-qemu-action/releases)
- [Commits](https://github.com/docker/setup-qemu-action/compare/v3...v4)

---
updated-dependencies:
- dependency-name: docker/setup-qemu-action
  dependency-version: '4'
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2026-05-04 14:15:19 +00:00
dependabot[bot]
1e940ee7e2 ci(deps): bump actions/setup-python from 5 to 6
Bumps [actions/setup-python](https://github.com/actions/setup-python) from 5 to 6.
- [Release notes](https://github.com/actions/setup-python/releases)
- [Commits](https://github.com/actions/setup-python/compare/v5...v6)

---
updated-dependencies:
- dependency-name: actions/setup-python
  dependency-version: '6'
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2026-05-04 14:15:14 +00:00
cft0808
1ceee6bc68 fix(ci): avoid YAML parse ambiguity in FastAPI import step 2026-04-27 23:01:54 +08:00
cft0808
66630203a4 docs: 补充项目设计文档、计划文档与截图资产
- 新增 docs/design-*.md:Docker 一键体验、御批模式、移动端响应式三个功能详细设计
- 新增 docs/dashboard-upgrade-plan.md、docs/performance-baseline-plan.md:看板升级和性能基线计划
- 新增 docs/screenshots/:看板界面全套截图(任务看板、官员总览、派发、新闻等共 28 张)
- 新增 edict/朝堂议政_开发规格.md:多 Agent 协作分析系统 Copilot 开发规格 v1.0
- .gitignore:排除 dashboard/dist/ 构建产物
2026-04-27 22:44:39 +08:00
cft0808
ae3942bc87 fix: 兼容 Windows 系统的 Python 解释器路径查找
在 Windows 上不存在 python3 命令,subprocess 调用会抛出 [WinError 2]。
在 utils.py 中新增 python_bin() 函数,优先使用 sys.executable(当前解释器路径),
回退到 shutil.which('python3') / shutil.which('python'),确保全平台兼容。
server.py 和 kanban_update.py 中所有硬编码的 'python3' 替换为 python_bin()。

Closes #289
2026-04-27 22:42:06 +08:00
cft0808
5f4da4e184 Merge pull request #306 from luoyanglang/wolf/fix-official-skills-hub-404
fix(skills): remove broken default skills hub
2026-04-27 22:30:35 +08:00
cft0808
9a73a1f27c Merge pull request #299 from voidborne-d/fix/task-mutation-race-condition
fix: eliminate TOCTOU race condition in concurrent task mutations
2026-04-27 22:30:28 +08:00
cft0808
7280fad446 Merge pull request #298 from njiangk/fix/python-3-10-startup-check
fix: require Python 3.10+ in edict startup scripts
2026-04-27 22:30:20 +08:00
luoyanglang
f21c0b293a fix(skills): remove broken default skills hub 2026-04-25 07:39:55 +00:00
voidborne-d
714f442e31 fix: eliminate TOCTOU race in task mutation paths
Background dispatch threads, the periodic scheduler scan, and HTTP
handlers all followed a load_tasks() → modify → save_tasks() pattern
without any mutual exclusion.  The atomic_json_write only protects the
write itself; it does NOT prevent a concurrent reader from loading a
stale snapshot and overwriting another thread's changes.

Scenario (before this fix):
  1. HTTP handler calls load_tasks() — gets snapshot A
  2. Dispatch thread calls load_tasks() — gets the same snapshot A
  3. HTTP handler modifies task X, calls save_tasks() — writes A'
  4. Dispatch thread modifies task Y, calls save_tasks() — writes A''
     (based on A, not A'), silently losing the HTTP handler's changes
     to task X

This is a classic TOCTOU (Time-of-Check-Time-of-Use) race.  The project
already has atomic_json_update() in file_lock.py that holds an exclusive
lock for the entire read-modify-write cycle, but none of the task
mutation paths used it.

Fix:
- Add modify_tasks(modifier) wrapper around atomic_json_update +
  refresh trigger
- Add modify_task(task_id, updater) convenience wrapper for single-task
  mutations
- Convert _update_task_scheduler (called from dispatch daemon threads)
  to use modify_task
- Convert handle_scheduler_scan (periodic background scanner) to use
  modify_tasks, with dispatch side-effects deferred until after the
  lock is released
- Convert handle_scheduler_retry and handle_scheduler_rollback to use
  modify_task

HTTP handler paths (handle_task_action, handle_review_action, etc.)
still use load_tasks/save_tasks for now — they run in the main thread
and are lower risk — but can be migrated incrementally.

Add 17 regression tests covering: atomic API correctness, scheduler
update persistence, scan stall detection, concurrent write survival
(the actual race), source-level audit of critical paths, and backward
compatibility of load_tasks/save_tasks.
2026-04-22 06:00:26 +00:00
njiang
67e9f1d40b chore: ignore local frontend dist artifacts 2026-04-21 14:17:47 +08:00
njiang
79f21eff2f fix: require Python 3.10+ in edict startup scripts 2026-04-21 13:57:01 +08:00
cft0808
96abcd12ec fix: normalize timestamps in SessionsPanel and server lastActive (#278 cherry-pick)
Cherry-pick the SessionsPanel.tsx and server.py fixes from PR #278
that were not covered by the merged #282:
- SessionsPanel: use shared formatDashboardTime for activity timestamps
- server.py: convert lastActive to local timezone in get_task_activity()
2026-04-20 00:25:18 +08:00
Octopus
e07d567f01 feat(skills): add MiniMax-AI/cli as default skill tap (#287)
将 MiniMax-AI/cli 的 SKILL.md 添加到 OFFICIAL_SKILLS_HUB,用户可通过 import-official-hub 命令安装 mmx_cli 技能
2026-04-20 00:23:18 +08:00
Matt Van Horn
f4a019a88d feat: add smooth animations to kanban dashboard (#293)
添加卡片加载渐入动画、主题切换平滑过渡、Tab 数字计数器动画,纯 CSS + vanilla JS,尊重 prefers-reduced-motion
2026-04-20 00:23:01 +08:00
cft0808
3f2dfb5df2 fix: deploy SOUL.md with correct uppercase filename (#294)
OpenClaw only loads SOUL.md (uppercase), but deploy_soul_files() was
writing to soul.md (lowercase), causing the deployed SOUL to be ignored.

Fixes #294
2026-04-20 00:18:35 +08:00
Matt Van Horn
42a520bb93 feat(agents): add qintianjian (observatory) agent for data analysis (#291)
新增钦天监 Agent SOUL.md,职责为数据分析、性能度量、趋势预测和可观测性,不与现有 12 个角色重叠
2026-04-20 00:17:19 +08:00
狼哥
af234d93d7 fix(dashboard): normalize task modal timestamps to local time (#282)
新增共享 time.ts 时间工具,统一 TaskModal 中调度时间、流转日志、活动时间的本地时区渲染,消除 UTC/本地混显问题
2026-04-20 00:17:10 +08:00
狼哥
c958d06cb4 fix(flow): prevent premature task completion before review (#280)
cmd_done() 不再直接写 Done,改为校验 todos 完成度后路由到 Review;dashboard 准奏也增加 todo 完成度门控,防止子任务未完成就关闭任务
2026-04-20 00:17:01 +08:00
狼哥
78f54655cc fix(dashboard): handle missing OpenClaw CLI during dispatch (#290)
Windows 环境下 OpenClaw CLI 未在 PATH 时,subprocess 抛出 WinError 2。新增 shutil.which 解析和 OPENCLAW_BIN 环境变量支持,将原始错误转为可操作的 openclaw-missing 状态
2026-04-20 00:16:51 +08:00
狼哥
8a858f12de fix(agents): align taizi and liubu SOULs with subagent flow (#285)
将 taizi/liubu SOUL.md 中残留的 sessions_send 指令替换为 subagent 流程,与 zhongshu/menxia/shangshu 保持一致
2026-04-20 00:16:41 +08:00
狼哥
56b3150e4c fix(ci): skip labeler for fork pull requests (#281)
Fork PRs 缺少写权限导致 actions/labeler 失败,跳过 label job 解决误红
2026-04-20 00:16:28 +08:00
cft0808
9444cfecc6 feat(scripts): 添加 Windows PowerShell 数据刷新脚本 (#245)
run_loop.sh 的 Windows 等效版本,支持单实例保护、日志轮转、
超时控制和定时巡检。感谢 @Vip4pt 贡献。

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-04-14 23:05:31 +08:00
cft0808
f41c981a19 fix(dashboard): 统一所有时间字段为本地时区展示 (#277)
将流转日志、会话详情、奏章时间线、巡检报告中的原始 substring
时间提取替换为 parseDateFlexible + 本地格式化,消除 UTC/本地混用。

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-04-14 23:05:15 +08:00
cft0808
70cd997a25 fix(court_discuss): 动态 max_tokens + 截断 JSON 修复 (#265)
- 根据参与官员数量动态计算 token 预算 (每位官员 300 + 200 基础)
- 新增 _try_repair_truncated_discuss() 从截断的 JSON 中提取完整消息
- 更新 .gitignore 防止追踪本地开发文件
2026-04-10 01:05:00 +08:00
狼哥
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
65c09cb94f chore: remove unrelated tracked files and update .gitignore
- Remove .vite/ cache directory from tracking
- Remove .vscode/settings.json (IDE-specific)
- Remove stale dashboard/dist build assets (old hashes)
- Remove root PDF duplicate of edict_agent_architecture.md
- Add .vite/ and .vscode/ to .gitignore
2026-04-05 22:19:38 +08:00
2759069519
e9aea538fb feat: 添加 QQ 机器人通知渠道 (#244)
feat: 添加 QQ 机器人通知渠道\n\n新增 edict/backend/app/channels/qq.py,实现 QQ Bot API v2 消息发送:\n- 支持私聊和群聊通知\n- 自动获取 access_token 并缓存\n- 线程安全的 token 刷新机制\n- 域名白名单限制为 api.sgroup.qq.com
2026-04-05 21:49:04 +08:00
Sebastion
c3c4e2a71f fix: CWE-22 path traversal in file:// URL handling (#258)
fix: apply allowed_roots check to file:// URLs in add_remote_skill (CWE-22)\n\nAdds .resolve() and allowed_roots validation to the file:// URL branch\nin add_remote_skill(), closing a path traversal vulnerability.\nIncludes 3 regression tests.
2026-04-05 21:48:44 +08:00
cft0808
4e51e348a5 fix: 修复任务卡死三大问题
1. Gateway检测增加重试机制(3次+递增等待),避免瞬时不可达直接放弃
2. 新增定时巡检线程(每120秒),自动发现停滞任务并触发重试/升级/回滚
3. 回滚增加次数上限(最多3次),超限自动标记Blocked防止无限循环
2026-04-05 14:51:34 +08:00
cft0808
f6af76bc6c docs: update README (zh/en/ja) for Week 0-4 features
- Tech highlights: EventBus, Outbox Relay, state machine audit, parallel dispatch, DAG orchestrator
- Project structure: add edict/backend, auth.py, agent groups, new scripts
- Launch: one-click start.sh, systemd production deploy
- Roadmap Phase 2: mark 8 items as completed
2026-04-04 12:29:08 +08:00
cft0808
74d8130391 feat: Week 0-4 optimizations - event bus, state machine, dispatch, outbox relay
- EventBus: Redis Streams pub/sub for decoupled service communication
- State machine: strict lifecycle transitions with audit logging
- Dispatch worker: parallel execution, retry with backoff, resource locking
- Orchestrator: DAG-based task decomposition and dependency resolution
- Outbox relay: transactional outbox pattern for reliable event delivery
- Auth: dashboard authentication module
- Agent groups: sansheng/liubu agent configuration
- CI/CD: Docker publish workflow, systemd service, start script
- Frontend: dashboard build assets
- Tests: state machine consistency tests
2026-04-04 12:16:32 +08:00
cft0808
0ab37d11bd fix: add from __future__ import annotations for Python 3.9 compat (Fix #242)
All edict/backend/app/ files using PEP 604 union syntax (X | Y) now
import annotations from __future__ to ensure compatibility with
Python 3.9. Also remove tracked build artifact tsconfig.tsbuildinfo.
2026-03-31 23:40:15 +08:00
cft0808
7baa3df457 ci: 添加 edict-backend CI job (PostgreSQL + Redis + Alembic)
新增 edict-backend job:
- PostgreSQL 16 + Redis 7 Service Containers
- 安装 edict/backend/requirements.txt 依赖
- edict/backend 下所有 .py 语法检查
- 运行 Alembic 数据库迁移验证
- 验证 FastAPI 应用可正常导入
2026-03-30 22:42:06 +08:00
cft0808
0f1c24bd44 fix: 修复多个bug并合并社区贡献
Bug 修复:
- Fix #232: court_discuss.py 添加 from __future__ import annotations 兼容 Python 3.9
- Fix #233: Dockerfile 添加 channels 模块 COPY 解决 Docker 运行时 ModuleNotFoundError
- Fix #234: sync_agent_config.py 将 dispatchChannel 默认值从 'feishu' 改为空字符串
- Fix #241: sync_agent_config.py 收集 defaults.models 中的所有可用模型到看板选择器

社区贡献 (cherry-pick):
- PR #239 (@ElninoZhong): 添加 workflow state vs execution ownership 文档
- PR #237 (@ElninoZhong): 修复 feishu 默认值问题
- PR #212 (@YIOYIOIOI): Windows install.ps1 优先 python 命令 + UTF-8 编码修复

依赖更新 (Dependabot):
- actions/checkout v4 → v6
- docker/setup-buildx-action v3 → v4
- docker/build-push-action v5 → v7
- actions/labeler v5 → v6
- actions/stale v9 → v10
2026-03-30 21:48:55 +08:00
cft0808
dc66e0666d chore: add community governance infrastructure
- CODEOWNERS: define code ownership for core paths (@cft0808)
- CODE_OF_CONDUCT.md: Contributor Covenant v2.1 (Chinese)
- SECURITY.md: vulnerability reporting policy
- CONTRIBUTING.md: add contributor ladder (Contributor→Triage→Committer→Maintainer)
- dependabot.yml: auto dependency updates (pip/npm/actions weekly)
- auto-label.yml + labeler.yml: PR auto-labeling by file path
- stale.yml: auto-close stale Issues (60d) and PRs (30d)
- Issue templates: add question.md, config.yml, needs-triage label
- Branch protection: require PR reviews, CI checks, code owner approval
2026-03-28 20:55:54 +08:00
cft0808
e63f7a17f9 Merge pull request #218 from ottoiflu/fix/self-referential-symlink-in-sync-scripts
合并符号链接自引用 bug 修复,解决 #217#214
2026-03-28 20:39:33 +08:00
YueKang
260d5c9f9c test: add regression tests for self-referential symlink bug (#217)
Two new test cases in test_sync_symlinks.py:

1. TestSyncScriptSymlink.test_skips_self_referential_via_directory_symlink
   Unit test: verifies _sync_script_symlink() returns False and leaves
   the real source file intact when dst_file is accessed through a
   directory-level symlink that points back to the project scripts/ dir.

2. TestSyncScriptsToWorkspaces.test_no_self_referential_symlinks_when_workspace_scripts_is_dir_symlink
   Integration test: simulates the install.sh scenario where
   workspace-main/scripts -> project/scripts, then confirms that
   sync_scripts_to_workspaces() does not convert any real source file
   into a self-referential symlink."
2026-03-28 17:10:16 +08:00
YueKang
385c8d2ddf fix: prevent self-referential symlinks in sync_scripts_to_workspaces
When install.sh link_resources() creates workspace-*/scripts as a
directory-level symlink pointing to the project scripts/ dir, iterating
over it in sync_scripts_to_workspaces() produces dst_file paths that
resolve to the same real file as src_file.

The old idempotency check only skipped when dst_file itself was already a
symlink:

    if dst_file.is_symlink() and dst_file.resolve() == src_resolved:
        return False

For a workspace whose scripts/ directory is a symlink-to-directory,
dst_file appears as a regular file (is_symlink() == False), so the check
passes, the real source file is unlinked, and os.symlink() re-creates it
as a self-referential link (foo.py -> foo.py).  Running run_loop.sh every
15 s makes the whole scripts/ directory unusable within one cycle.

Fix: resolve dst_file before any other check and bail out early when
dst_resolved == src_resolved, regardless of whether dst_file itself is
stored as a symlink entry.
2026-03-28 16:47:38 +08:00
cft0808
18c15209ca feat: free-form edict input + task output viewer (#92, #29)
- Add '自由下旨' textarea in templates tab for natural language edicts
- Add /api/task-output/<id> endpoint to read deliverable content
- Add '查看奏章' button in memorial modal to load output inline

Closes #92, Closes #29
2026-03-26 22:14:01 +08:00
cft0808
f31d1a7843 feat: add feedback button '祈告上苍' to dashboard header (#98)
- Opens GitHub issue creation with bug/feature templates
- Pre-fills title prefix and body template based on type
- Auto-sets appropriate label (bug/enhancement)

Closes #98
2026-03-26 22:06:58 +08:00
cft0808
1b506312a2 feat: add light/dark theme toggle to dashboard (#152)
- Add light theme CSS variables (html.light)
- Add toggle button in header with localStorage persistence
- All existing elements auto-adapt via CSS custom properties

Closes #152
2026-03-26 22:04:59 +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
cft0808
332ef07fc9 feat: multi-channel notification push (Phase 3+4)
- Integrate channel adapters into dashboard server push_notification()
- Add migrate_notification_config() for backward compatibility
- Add /api/notification-channels endpoint
- Update dashboard UI with multi-channel select
- Rename env vars to generic NOTIFICATION_ENABLED/DEFAULT_DISPATCH_CHANNEL
- Add env var fallback in sync_agent_config.py

Closes #200, Closes #201
2026-03-26 21:52:54 +08:00