【Bug】源码启动下所有工具调用失败:"Cannot read properties of undefined (reading 'prepare')" —— runtime 解析默认值导致 @deepseek-ai/dsh-tools 被加载两份,TOOL_RUNTIME_SCHEDULER Symbol 分裂 #7107
Replies: 1 comment
|
Correction accepted in the useful direction: your attribution is right, and I can pin it to the line. I independently traced it before seeing your report and reached the same commit — you were the only one of four reports to name it, and you also named the mechanism (two module instances, module-level
So the regression is a pure default flip, not a resolver bug. Your "Loader 挂载插件走一个解析面, agent-loop 运行时 bundle 导入同一包走另一个解析面" is exactly it: Crash site for completeness: Worth knowing: the same commit flipped a second carrier and that half was already reverted. It also set Both in Full cluster write-up plus the |
Uh oh!
There was an error while loading. Please reload this page.
问题概述
自提交
9ddef327a4("feat: resolution mode link to runtime",随0.1.6-alpha.2发布)起,源码启动(pnpm dsh web、pnpm dsh --profile …)下每一次模型工具调用都会失败:TypeError: Cannot read properties of undefined (reading 'prepare')
界面上回合直接报错结束,日志中没有对应的
tool/result事件。根因是
@deepseek-ai/dsh-tools出现了双模块实例:Loader 挂载插件走一个解析面,agent-loop 运行时 bundle 导入同一包走另一个解析面。模块级的TOOL_RUNTIME_SCHEDULER = Symbol(...)被求值两次,产生两个不相等的 Symbol,于是ctx.tools[TOOL_RUNTIME_SCHEDULER]解析为undefined。环境
ddefc45fbc(master,0.1.6-alpha.2发布合并);回归由9ddef327a4(2026-09-17)引入v22.23.2,pnpm11.7.0,Linux x64pnpm dsh web/pnpm dsh --profile headless(即源码启动:node --import tsx/esm apps/cli/src/bin.ts)最小复现(无需 API key)
仓库自带的快照测试在开发默认的源码模式下即可复现:
All reactions