Support agenthub#921
Conversation
There was a problem hiding this comment.
Code Review
This pull request migrates the agent workspace management business logic from modelscope-hub to ms-agent, introducing a comprehensive suite of CLI commands (upload, download, convert, watch, etc.) and a section-level Markdown merge engine to support cross-framework agent migration. Feedback on these changes highlights several areas for improvement: using a comment-preserving YAML parser or regex for config.yaml sanitization to avoid stripping user comments; reusing the existing tabulate utility in _commands.py to reduce duplication; explicitly specifying UTF-8 encoding when reading and writing temporary files and PID files in _watcher.py for Windows compatibility; and logging a warning when files are silently skipped due to exceeding size limits in _workspace.py.
Important
The consumer version of Gemini Code Assist on GitHub is being sunset. Starting June 18, 2026, new organization installations will be blocked, and all code review activity will officially cease on July 17, 2026.
For more details on the timeline and next steps, please review the Help Documentation.
命令行用法
支持的框架:
qoder, qwenpaw, openclaw, hermes, nanobot, openhuman, ms-agent测试用例覆盖(
tests/agent_hub/)test_watch_sync.pytest_upload_download.pytest_convert_targetname.py--target-name派生与目标命名test_cli.pytest_merge.pytest_agent_frameworks.pytest_workspace.py薄弱点 / 重点测试点
wmic查 PID、文件读写编码(非 ASCII 路径/用户名)在 Windows 上是否都正常。-n <name>的上传/下载正确性:只处理该 agent;本地存在多个 agent 时能正确选中;下载按指定 name 写入。-f/-r)、无效框架名、非法 repo 格式(非owner/name)时是否明确报错而非静默/崩溃。--pull)有效性:远端改动拉取到本地、双向同步、远端删除能传播到本地。backups正确列出;restore --from-backup last/指定文件能还原;还原前自动备份当前状态。convert与download --target-framework的格式互转、默认模板文件跳过、--target-name派生。--token/--endpoint覆盖生效、匿名(无 token)下载。../)、超限大文件跳过、损坏的 sync state 降级、两个 watch 进程并发竞争同一状态文件。