Sync: upstream cft0808/edict (43 commits behind)#1
Merged
zhangyuhao7728-coder merged 44 commits intomainfrom Apr 13, 2026
Merged
Sync: upstream cft0808/edict (43 commits behind)#1zhangyuhao7728-coder merged 44 commits intomainfrom
zhangyuhao7728-coder merged 44 commits intomainfrom
Conversation
Co-authored-by: cft0808 <41196455+cft0808@users.noreply.github.com>
…#145) The Ministry of Works (gongbu) historically handled infrastructure and public works, while the Ministry of War (bingbu) handled military operations. The current SOUL.md files had these duties inverted. - gongbu now handles infrastructure, deployment/ops, and monitoring - bingbu now handles engineering, architecture, and feature development - Updated duty labels in sync_agent_config.py to match Closes cft0808#131 Co-authored-by: Matt Van Horn <455140+mvanhorn@users.noreply.github.com> Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com> Co-authored-by: cft0808 <41196455+cft0808@users.noreply.github.com>
Replaced subprocess curl command with urllib for fetching RSS feeds. Docker environment doesn't support such un-installed package Co-authored-by: cft0808 <41196455+cft0808@users.noreply.github.com>
* fix(windows): repair install.ps1 parser errors and make installer runnable * fix(windows): keep install.ps1 PowerShell-5.1 compatible and correct startup hints --------- Co-authored-by: cft0808 <41196455+cft0808@users.noreply.github.com>
**问题一:无效备份不断堆积** 当 pending_model_changes.json 中的变更与 openclaw.json 现有值相同时 (即 model 已经是目标值),脚本仍会创建备份文件并重写配置, 导致每 15 秒产生一个内容完全相同的 .bak.model-* 文件。 修复:先比较新旧配置的 JSON 内容,只有真正发生变化时才备份和写入。 **问题二:log_data.extend() AttributeError 导致 pending 永不清空** CHANGE_LOG 文件损坏或内容为 dict 时,rj() 返回 dict 而非 list, 调用 .extend() 抛出 AttributeError,使函数在第 75 行中断。 后续的 atomic_json_write(PENDING, []) 永远不会执行, pending_model_changes.json 始终非空,造成每次循环都重复处理。 修复:在 extend 前加 isinstance 检查,非 list 时重置为空列表。 Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com> Co-authored-by: cft0808 <41196455+cft0808@users.noreply.github.com>
run_loop.sh 中 scheduler-scan 的 curl 地址硬编码为 7891,与 server.py 的 --port 参数不一致,导致改变端口后 loop 无法调用 dashboard API。 - run_loop.sh:从 EDICT_DASHBOARD_PORT 环境变量读取端口(默认 7891) - server.py:启动时根据 --port 动态更新 _DASHBOARD_PORT 和 _DEFAULT_ORIGINS,修正 CORS fallback 地址 Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com> Co-authored-by: cft0808 <41196455+cft0808@users.noreply.github.com>
在 Windows 平台上 fcntl 模块不存在,导致 ModuleNotFoundError。 改为平台条件分支:Unix 使用 fcntl.flock,Windows 使用 msvcrt.locking。 保持零外部依赖,完全向后兼容。 Fixes cft0808#180
…dential sync (cft0808#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 cft0808#179
…cft0808#147) The isArchived() function treated all Done/Cancelled tasks as archived, hiding them from the active view immediately on completion. This caused tasks with incomplete progress to appear archived prematurely. Change isArchived() to only check the explicit archived flag, matching the server-side archival logic. Done tasks now stay visible until the user explicitly archives them. Fixed in both dashboard/dashboard.html and edict/frontend/src/store.ts. Note: dashboard/dist/ needs a rebuild (npm run build) to pick up the React source change. Closes cft0808#54 Co-authored-by: Matt Van Horn <455140+mvanhorn@users.noreply.github.com> Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com> Co-authored-by: cft0808 <41196455+cft0808@users.noreply.github.com>
…ft0808#56) (cft0808#176) sync_scripts_to_workspaces() previously used physical file copies. Scripts that derive project root from __file__ (e.g. kanban_update.py) therefore resolved to the workspace directory when run as a copied file, causing tasks_source.json writes to land in the wrong location while the Dashboard reads from the canonical data/ directory. Replace write_bytes() with os.symlink() so __file__ always resolves back to the project scripts/ directory. This ensures that all path-derived constants (TASKS_FILE, DATA, etc.) point to the single canonical data/ folder regardless of which agent workspace runs the script. Added _sync_script_symlink() helper with: - Idempotent re-runs (skip if link already correct) - Automatic cleanup of stale physical copies and broken symlinks - Full test suite (10 tests) covering creation, idempotency, replacement of physical copies, broken symlinks, __file__ resolution, etc. Closes cft0808#56 Co-authored-by: cft0808 <41196455+cft0808@users.noreply.github.com>
- shangshu/SOUL.md: 移除对不存在的 skills/dispatch/SKILL.md 的读取指令, 部门路由表已内联在 SOUL.md 中,无需外部文件(运行时产生 ENOENT) - .gitignore: 添加 .env 和 *.tsbuildinfo Refs cft0808#89
… + 心跳阈值调整 1. cmd_flow 流转时同步更新 org=to_dept 并记录 agent 归属,修复看板流转 后仍显示旧部门的问题(cft0808#149 根因之一) 2. cmd_done 完成时立即写入 outputMeta,不再依赖异步补充 3. STATE_ORG_MAP 补全 'Next': '尚书省',修复 Next 状态 org 字段为空 4. 心跳阈值从 3/10min 调整为 5/15min,减少误报 Refs cft0808#162, Fixes cft0808#149
将 dispatchChannel 默认值从 'feishu' 改为空字符串。 仅当 agent_config.json 中显式配置了 dispatchChannel 时才传 --deliver --channel 参数,避免未配置飞书的用户(telegram/wecom 等)遇到 'unknown channel: feishu' 错误。 Fixes cft0808#182
将 atomic_json_write() 中的 fcntl.flock 直接调用改为 _lock_exclusive()/_unlock() 跨平台抽象函数,同时为 os.fdopen 添加 encoding='utf-8' 参数。 Refs cft0808#204, Fixes cft0808#188
fix: 修复 Docker Compose 从源码构建和启动的 7 个问题 (cft0808#202) - config.py: DATABASE_URL 环境变量通过 Field alias 正确读取 - alembic.ini: 改用同步 postgresql 驱动 (非 asyncpg),标注 fallback - task.py: 对齐 task_service.py 字段 (task_id UUID, trace_id, meta 等) - dispatch_worker/orchestrator_worker: 添加 __main__ 入口 - nginx.conf: 添加 Docker DNS resolver 127.0.0.11 - vite.config.ts: outDir 改为 'dist' (Docker context 内) - docker-compose.yml: context 改为 '..' 使 Dockerfile 路径正确解析 - Dockerfile: 安装 OpenClaw CLI + 注入 agent workspace 骨架 Fixes cft0808#202
Co-authored-by: cft0808 <41196455+cft0808@users.noreply.github.com>
- 新增 NotificationChannel 协议定义 (base.py)
- 实现 FeishuChannel 适配器 (feishu.py)
- 添加渠道注册与查询函数 (__init__.py)
- 重命名配置项: feishu_deliver -> notification_enabled
feishu_channel -> default_dispatch_channel
Phase 1/4: 为多渠道通知系统奠定基础设施
Co-authored-by: cft0808 <41196455+cft0808@users.noreply.github.com>
Refs cft0808#199, Closes cft0808#190 (部分) - wecom.py: 企业微信机器人 Webhook - telegram.py: Telegram Bot API - discord.py: Discord Webhook - slack.py: Slack Incoming Webhook - webhook.py: 通用 JSON Webhook - __init__.py: 注册所有渠道
- kanban_update.py: 优先读取 EDICT_HOME 定位中央仓库, 解决脚本被复制到 workspace 后数据孤岛问题 (Fixes cft0808#90) - run_loop.sh: 自动 export EDICT_HOME - uninstall.sh: 一键卸载脚本 (Fixes cft0808#114, Refs cft0808#118) - 停止相关进程 - 清理 openclaw.json 注册 - 删除 workspace 目录 - 可选删除 data 缓存
ci: add Python 3.13 to test matrix (cft0808#32)
ci: improve GitHub Actions workflow with caching and Docker build (cft0808#16)
- 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 cft0808#200, Closes cft0808#201
…ments - Auto-detect task data dir from ~/.openclaw/workspace-*/data (cft0808#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 (cft0808#67) - Add UTF-8 encoding to file_lock reads for Windows compat (cft0808#96) - Use absolute path in install.sh hint (cft0808#107) Closes cft0808#117, Closes cft0808#107
- 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 cft0808#152
- 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 cft0808#98
) - 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 cft0808#92, Closes cft0808#29
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.
) 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."
…link-in-sync-scripts 合并符号链接自引用 bug 修复,解决 cft0808#217 和 cft0808#214
- 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
Bug 修复: - Fix cft0808#232: court_discuss.py 添加 from __future__ import annotations 兼容 Python 3.9 - Fix cft0808#233: Dockerfile 添加 channels 模块 COPY 解决 Docker 运行时 ModuleNotFoundError - Fix cft0808#234: sync_agent_config.py 将 dispatchChannel 默认值从 'feishu' 改为空字符串 - Fix cft0808#241: sync_agent_config.py 收集 defaults.models 中的所有可用模型到看板选择器 社区贡献 (cherry-pick): - PR cft0808#239 (@ElninoZhong): 添加 workflow state vs execution ownership 文档 - PR cft0808#237 (@ElninoZhong): 修复 feishu 默认值问题 - PR cft0808#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
新增 edict-backend job: - PostgreSQL 16 + Redis 7 Service Containers - 安装 edict/backend/requirements.txt 依赖 - edict/backend 下所有 .py 语法检查 - 运行 Alembic 数据库迁移验证 - 验证 FastAPI 应用可正常导入
…cft0808#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.
…tbox 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
- 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
1. Gateway检测增加重试机制(3次+递增等待),避免瞬时不可达直接放弃 2. 新增定时巡检线程(每120秒),自动发现停滞任务并触发重试/升级/回滚 3. 回滚增加次数上限(最多3次),超限自动标记Blocked防止无限循环
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.
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
- 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
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 cft0808#271
- 根据参与官员数量动态计算 token 预算 (每位官员 300 + 200 基础) - 新增 _try_repair_truncated_discuss() 从截断的 JSON 中提取完整消息 - 更新 .gitignore 防止追踪本地开发文件
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
同步上游 cft0808/edict 最新43个commits。
包含:
注意:由于OAuth token缺少workflow scope,.github/workflows目录未同步。
请手动确认是否需要同步workflow文件。