Bug: Plugin registrations on the host plane are invisible to agents (dsh 0.1.0-rc.6) #1782
Replies: 1 comment
|
这个症状很可能属于 #1697 家族(dsh-tools 双实例),而不是 scope 层的问题——先说结论,再说怎么验证。 为什么更像双实例agent 的工具视图在
这正好解释你的对照组:preset realm 里注册的命令可见,是因为 preset 是宿主包自带的、没有影子副本参与。 怎么验证(不用猜)# 1. 检查 profile 顶层是否有真实目录形式的 @deepseek-ai/* 副本(宿主遮蔽)
node /path/to/dsh-plugin-doctor/lib/bin.js --profile ~/.dsh/profiles/web
# FAIL + 列出 dsh-tools 即命中
# 2. 插件里对比 ctx.tools 的身份
# 在插件的 apply() 里打印 ctx.tools 的构造来源(例如 require.resolve('@deepseek-ai/dsh-tools')),
# 和宿主进程里 dsh-agent-loop 解析到的路径对比;不一致 = 双实例。我们自己的插件(dsh-github-intelligence / dsh-plugin-doctor 等)的 CI 目前只证明"加载 + 注册 + handler 可调用",没有证明 agent 会话里真的能看到工具——所以这个 bug 如果成立,影响面是"所有经 profile 安装的第三方插件",包括我们的。我已经把这个验证缺口记下来了,会加进发布前自检清单。 修复如果是双实例:#1697 的修复已备好( 如果确认不是双实例( |
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Bug 报告:host 平面(根 realm)注册的命令/工具对 agent 不可见(dsh 0.1.0-rc.6)
环境:dsh 0.1.0-rc.6(npm 安装,
dsh webprofile),macOS,Node 26。通过 profile patch(
cordis.patch.yml)插入到 host 平面的插件挂载成功——pluginInventory/list显示fiberPhase: "active",cordis 用new正常实例化 class 插件(构造函数执行无报错)——但插件注册的所有内容对 agent 都不可见:commands/list不包含插件注册的命令(构造函数里通过ctx.get("commands").register(...)注册)commands/execute返回空(命令未解析到)ctx.get("tools").register(...)注册)对照组:在 agent preset 的 isolate realm 内注册的命令(standard 预设
compactionrealm 里的/compact)对 agent 可见;而 host 根平面的注册不可见。复现步骤:
billion-context-dsh)~/.dsh/profiles/web/cordis.patch.yml)中加入:dsh web,打开新会话commands/list(或让模型列出工具)→ 插件的命令/工具缺失影响:host 平面插件(官方文档中的全局能力扩展方式)在 rc.6 上对 agent 完全失效。只有 preset realm 内的注册能进入 agent 的 scope 视图。
可疑点:scope 感知的分层注册表(commands/tools)——
register()把注册插入到"注册方 ctx"对应的层;agent 视图(view(agent))沿 agent 的 scope 链收集各层——host 根 ctx 上的注册没有进入任何被收集的层。愿意配合提供更多细节或测试补丁。(因本仓库关闭了 Issues 故发在 Discussions;如项目有更偏好的反馈渠道请告知,我可以迁移。)
All reactions