fix: 移除 main agent 兼容逻辑 + 修复尚书省缺失 skill 引用#89
Open
alfadb wants to merge 2 commits intocft0808:mainfrom
Open
Conversation
- agents/shangshu/SOUL.md: 移除对不存在的 skills/dispatch/SKILL.md 的读取指令, 部门路由表已内联无需外部 skill 文件 - scripts/sync_agent_config.py: 移除 4 处 main agent 兼容逻辑 (ID_LABEL、EXTRA_AGENTS、scripts 同步、SOUL.md 同步), taizi 为唯一入口代理 - scripts/fetch_morning_news.py: 修复 RSS media 标签链式查找, 避免 find() 链在第一个返回 None 时报错 - .gitignore: 添加 .env 和 *.tsbuildinfo Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
There was a problem hiding this comment.
Pull request overview
该 PR 主要围绕 Edict v1.2 的 agent 入口收敛(以 taizi 为唯一入口)进行清理,同时修复 RSS 图片解析的兼容性问题,并移除会导致运行时报错的错误引用/构建产物提交。
Changes:
sync_agent_config.py移除mainagent 的 legacy 兼容配置与同步逻辑,仅保留taizi作为规范入口。- 修复
fetch_morning_news.py中 RSSmedia:*标签解析:避免 ElementTreeElement在布尔判断下因“无子节点”被当作 False 导致误走 fallback。 - 清理尚书省 SOUL 指令中对不存在 skill 文件的读取,并将
.env、*.tsbuildinfo纳入忽略规则(并删除已提交的 tsbuildinfo)。
Reviewed changes
Copilot reviewed 4 out of 5 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| scripts/sync_agent_config.py | 移除 main 的 legacy entry、EXTRA_AGENTS、workspace 脚本同步与 SOUL 同步逻辑 |
| scripts/fetch_morning_news.py | 修复 media:thumbnail / media:content 的查找逻辑,改用 is None 判空 |
| agents/shangshu/SOUL.md | 移除对不存在的 skills/dispatch/SKILL.md 的读取步骤,内联路由表继续使用 |
| .gitignore | 忽略 .env 与 *.tsbuildinfo,避免敏感信息/构建缓存进入仓库 |
| edict/frontend/tsconfig.tsbuildinfo | 删除误提交的 TS 构建缓存文件 |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
scripts/sync_agent_config.py
Outdated
Comment on lines
113
to
118
| @@ -114,8 +114,7 @@ def main(): | |||
| EXTRA_AGENTS = { | |||
| 'taizi': {'model': default_model, 'workspace': str(pathlib.Path.home() / '.openclaw/workspace-taizi'), | |||
| 'allowAgents': ['zhongshu']}, | |||
| 'main': {'model': default_model, 'workspace': str(pathlib.Path.home() / '.openclaw/workspace-main'), | |||
| 'allowAgents': ['zhongshu','menxia','shangshu','hubu','libu','bingbu','xingbu','gongbu','libu_hr']}, | |||
| # 'main' legacy entry removed — taizi is the canonical entry point | |||
| 'zaochao': {'model': default_model, 'workspace': str(pathlib.Path.home() / '.openclaw/workspace-zaochao'), | |||
There was a problem hiding this comment.
这里的注释仍写“兼容旧版 main”,但本次改动已移除了 main 的 legacy 逻辑(ID_LABEL/EXTRA_AGENTS 等)。建议更新或删除该注释,避免误导后续维护者对 EXTRA_AGENTS 的用途判断。
Author
There was a problem hiding this comment.
Fixed in 1b3b2d1 — removed all 4 residual legacy comments, including the one in EXTRA_AGENTS and the parent comment above it.
根据 PR cft0808#89 review 反馈,清理 sync_agent_config.py 中 4 处 已无意义的 "main legacy removed" 注释。 Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
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.
Summary
skills/dispatch/SKILL.md的读取指令。部门路由表已内联在 SOUL.md 中,无需外部 skill 文件(运行时会产生 ENOENT 错误)find()返回None时不能直接链式调用第二个find().env(含数据库凭据)和*.tsbuildinfo(构建缓存)Test plan
sync_agent_config.py在无 main agent 目录的环境下正常运行fetch_morning_news.py能正确解析含/不含 media 标签的 RSS 源🤖 Generated with Claude Code