极简模式会注入已安装插件的工具 #5786
Replies: 2 comments
|
Good diagnosis — I verified the mechanism against the current source (dsh v0.1.3-alpha.1 / master 1. The 2. Nothing in the preset composition registers a 3. The Why this is hard to fix in-tree but tractable for a plugin: the clean fix is for the preset composition to apply a |
|
我确认了根因,并发布了一个社区插件来修复它。 根因(已在源码中验证): 插件形态的修复:我发布了
用法( plugins:
"@argszero/cordis-plugin-preset-tool-filter":
allowlists:
minimal: [bash, str_replace_editor]
|
Uh oh!
There was an error while loading. Please reload this page.
问题:已安装插件定义的工具会泄漏进极简模式的模型工具列表。极简模式应只暴露 str_replace_editor 与持久 shell(win32 下为 pwsh),实测却出现了全部插件工具。
复现:web profile 安装任一带工具的插件,切换到极简模式会话,查看发给模型的工具定义即可看到。
原因:插件工具注册在 tools 注册表的 global 层,而 agent preset 的 standing scope 会无条件继承 global 层,preset 没有任何排除继承工具的机制;插件挂载时也没有 agent/preset scope 可选,插件侧无从规避。
All reactions