Fix agent cmd bugs - #935
Open
tastelikefeet wants to merge 1 commit into
Open
Conversation
alcholiclg
approved these changes
Aug 12, 2026
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.
1. private 上传谎报
--visibility private上传后日志声称 private、退出码 0,服务端却是 public,属于静默泄露。现在建仓后回读一次可见性,确凿读到 public 就在推送任何文件之前中止;日志改为 "requested visibility=x",不再把请求说成结果。
读不到元数据时放行而非拦截,避免因查询延迟误伤正常的私有上传。
2. 跨框架转换残留源框架私有配置
ms-agent ↔ hermes 互转时
config.yaml被原样搬到目标目录,格式不兼容导致目标框架加载失败。根因是两个框架都声明了同名文件,使"目标端没有匹配规则就过滤掉"这层保护失效。
新增
PRODUCT_PRIVATE_FILES,跨框架时丢弃这类同名不同格式的私有配置(skill.json、agent.json、config.toml同理);同框架同步不受影响,仍逐字保留。3.
--local-dir指向安装根目录时报"no files found"nanobot 的文件在
.nanobot/workspace/而非.nanobot/下,用户传前者会直接失败。框架可通过
_ROOT_SUBDIRS申报数据根所在的子目录,只在传入目录自身不含本框架文件、且申报的子目录确实存在时才下降一层。刻意不做递归搜索:该路径同时是 download/convert 的写入目标,猜错目录可能覆盖无关文件(例如备份副本)。
4. 登录拿不到用户名
/users/me已改为返回 OIDC 标准字段,用户名从Username变成name,导致取到空字符串。空用户名会被拼进仓库路径,先触发建仓
path is required,再产生agents//<name>的双斜杠 404,报错完全指不到真正原因。改为调用
modelscope_hub新增的get_current_username()(老字段保留兜底,兼容尚未升级的环境),依赖 modelscope/modelscope_hub#53。5. 在线测试被"框架不支持"淹没
服务端建仓只接受
ms-agent和qwenpaw,其余框架一律 400;TRY_EXP_FRAMEWORKS只放开客户端校验,对服务端无效,所以这些用例在线永远不可能通过。新增
skip_if_server_rejects(),复用STABLE_FRAMEWORKS判断并给出明确跳过原因;多框架用例把判断放在subTest内,被支持的框架照常真跑。另修
test_09_first_sync_empty_baseline:它是本文件里唯一还在用"固定 sleep 后读一次"的用例,子进程启动加建仓超过 15 秒就必然失败,现统一改用既有的_eventually轮询。验证
已知边界
test_watch_sync.py中仍有若干"固定 sleep 后直接读远端"的用例,目前因框架被跳过而未暴露;待服务端支持后需一并改为轮询。