Repository navigation
Replies: 6 comments 2 replies
|
็้ผๅ |
|
่ฏ่ฟไบ๏ผmacos ไธไผผไนๆ ๆ |
|
ๆๅจ Windows 11ใๅฝๅ ้คๆขๅคๆบ็ ๅฏๅจ็ export const TOOL_RUNTIME_SCHEDULER: unique symbol = Symbol.for('@deepseek-ai/dsh-tools.scheduler')ๆๆฌๅฐๅขๅ ไบ๏ผ expect(Symbol.keyFor(TOOL_RUNTIME_SCHEDULER)).toBe('@deepseek-ai/dsh-tools.scheduler')้ช่ฏๆ ๅต๏ผ
ๆๅ ๅๅๅธ็ #7015 ๆ่ฟฐ็ๆฏ HMR ่งฆๅ่ทฏๅพ๏ผ็ฐ็กฎ่ฎคๅฎไธๆฌ่ฎจ่ฎบ้ๅค๏ผๅฐๅ ถๅ ณ้ญๅนถๆๅ็ปญไฟกๆฏ้ไธญๅจ่ฟ้ใ I reproduced the same Using |
ๆฑๆป็ป่ฎบไธๅฎๆดไฟฎๅคๆนๆก่ฟๆ่ฟไบๆฅๅๅฑไบๅไธๆ ้ๆ๏ผไฝๆไธ็ง่งฆๅ่ทฏๅพ๏ผ
ไธ่ ๆ็ป้ฝๅจ่ฟ้ๅคฑ่ดฅ๏ผ ctx.tools[TOOL_RUNTIME_SCHEDULER].prepare(call.exec)
็จๆท็ซๅณๆขๅคๅๆณ
ไธๆธธไฟฎๅค 1๏ผๆบ็ ๅไบง็ฉไฟๆๅไธๆจกๅๅนณ้ขๆบ็ ๅฏๅจๅบ้ป่ฎค const packaged = (process as NodeJS.Process & { pkg?: unknown }).pkg !== undefined
const sourceLaunch = import.meta.url.endsWith('.ts')
const defaultResolutionMode: ProfileResolutionMode = sourceLaunch ? 'link' : 'runtime'
const resolutionMode = packaged ? 'runtime' : options.resolutionMode ?? defaultResolutionMode่ฟๆฏๆ ๆกไปถๆนๅ
ไธๆธธไฟฎๅค 2๏ผ่ทจๆจกๅๅฎไพๅ ฑไบซ scheduler ้ฎexport const TOOL_RUNTIME_SCHEDULER: unique symbol
= Symbol.for('@deepseek-ai/dsh-tools.scheduler')่ฟ้กน็กฌๅๅๆถ่ฆ็ profile ้ๅคๅ
ๅ HMRใๅฎไธ่ฝไฟฎๅคๆดไธช้ๅคๆจกๅๅพไธญๆๆ ไธๆธธไฟฎๅค 3๏ผๅฏๅจๆถๆฃๆต้ๅคๆ ธๅฟๆจกๅprofile resolution / plugin install ๅฎๆๅ๏ผๅบไป installation anchor ๅๆฏไธช profile/plugin resolution anchor ่งฃๆๅ
ณ้ฎๆ ธๅฟๅ
ๅนถๆฏ่พ
ๆไปถ็ฎก็ๅจๅฎ่ฃ
ๅฎๆๅไนๅบๆง่กๅไธๆฃๆฅใ ไธๆธธไฟฎๅค 4๏ผๅจๅๅ ฅ tool/call ๅๅๅพ schedulerๅฝๅๆต็จๅ
ๅ const scheduler = ctx.tools[TOOL_RUNTIME_SCHEDULER]
if (scheduler === undefined) {
throw new ToolRuntimeSchedulerUnavailableError(/* include resolved package paths */)
}่ฟๆ ท่ณๅฐๆ้่ฏฏๅๆๅฏ่กๅจ็ typed error๏ผๅนถ็กฎไฟ่ฏฅ้่ฏฏไธไผไบง็ๆฌ็ฉบ ๅฟ ้กปๅขๅ ็ๅๅฝ้จ็ฆ
ๆฌๅฐ้ช่ฏๆๅจ Windows 11 ๅฝๅ checkout ไธๅบ็จไบๅไธค้กนไปฃ็ ไฟฎๆน๏ผ
็ธๅ ณๆฅๅๅ ๆฌ #4529ใ#4601ใ#6416ใ#6529ใ#6967ใ#6974ใ#6975ใ#6992ใ#6994ใ#6996 ๅ #7011ใๅปบ่ฎฎๆๆฌ่ฎจ่ฎบไฝไธบ 0.1.6-alpha.2 ๆบ็ ๅฏๅจๅๅฝ็้ไธญ่ท่ธชๅ ฅๅฃใ English summary: this is one failure family with three triggers: source/artifact plane mixing, profile-local duplicate core packages, and HMR re-evaluation. The complete fix is to (1) default TypeScript source launches to |
|
ๆไปฌ็ฌ็ซๅค็ฐๅนถๅฎไฝไบๅไธ้ฎ้ข๏ผprofile ็ ESM ๅๅค่งฃๆๆ pnpm ็ฌฆๅท้พๆฅไธ็ ๆๅฐไฟฎๅค๏ผๆ่ฏฅ้็น่ง่ๅไธบ็ๅฎ่ทฏๅพ๏ผ+ ๅๅฝ็บข็ปฟๆต่ฏ + ๆ/ๆ ๆๅปบไบง็ฉ๏ผA/B๏ผไธ็ซฏๅฐ็ซฏๅคๆต่ง #7048ใ่ฏฅไฟฎๅคไธไพ่ตๆ้ป่ฎค mode ๆนๅ |
|
ๅคๅถไปฅไธๆๆฌ็ปAgent็จๆฅไฟฎๅคๆญค้ฎ้ข ไปปๅก๏ผไฟฎๅค dsh ๆบ็ ๅฏๅจไธๆๆๅทฅๅ
ท่ฐ็จๅดฉๆบ๏ผ
|
Uh oh!
There was an error while loading. Please reload this page.
็ฏๅข
ddefc45fbc(0.1.6-alpha.2)pnpm dsh headless "..."ไธpnpm dsh webๅๅฏๅค็ฐ(ๅ ็ฝฎ headless ไธ่ชๅฎไน web profile ๅๅๅฝฑๅ)ๅค็ฐ
ddefc45fbcๅนถpnpm installpnpm dsh headless "็จ bash ๅทฅๅ ทๆง่ก echo hi"(ๆpnpm dsh webๅๅจไผ่ฏ้่ฐ็จไปปๆๅทฅๅ ท)ๆ ้ๆฐๅๆต่ฏ,ไปๅบ่ชๅธฆ็ keyless ๅๆพๅบๆฏๅณๅฏๅค็ฐ:
ๅฎ้ ่กไธบ
CLI ่พๅบ:
ไผ่ฏๆฅๅฟไธญ
tool/callไนๅ็ดง่ทturn/end:{"reason":{"kind":"error","error":{"message":"Cannot read properties of undefined (reading 'prepare')","code":"UNKNOWN"}}}bash-tool-turnๅฟซ็ งๅบๆฏๅจddefc45fbcไธ็ดๆฅ็บข:ๆ นๅ
ๆไบค 9ddef327a4(้ 0.1.6-alpha.2 ๅๅธ)ๆ้ packaged ๅฏๅจ็้ป่ฎค่งฃๆๆจกๅผไป
linkๆนไธบruntime(profile-boot.ts#L263)ใๅจ tsx ๆบ็ ๅฏๅจไธ:
pathsๆ่ฃธๅฏผๅ ฅ@deepseek-ai/dsh-toolsๆ ๅฐๅฐpackages/core/tools/srcexportsๅ ่ฝฝๆไปถๅ ฅๅฃ โlib/dsh-tools;TOOL_RUNTIME_SCHEDULERๆฏunique symbol,ไธคไปฝๅๆไธไธชๆ่ฟฐ็ธๅไฝๅฏน่ฑกไธๅ็ symbolctx.tools[TOOL_RUNTIME_SCHEDULER].prepare(...)ๅๅฐundefined,ๆๆๅทฅๅ ท่ฐ็จๅดฉๆบๆๆกฉ่ฏๆฎ:
ๆๆ่กไธบ
้ป่ฎคๆบ็ ๅฏๅจไธๅทฅๅ ท่ฐ็จๆญฃๅธธๆง่ก(9ddef32 ไนๅ้ป่ฎค
linkๆถๆญฃๅธธ)ใๅปบ่ฎฎไฟฎๅค
ๆๅฐไฟฎๅค:้ packaged ็้ป่ฎคๅผๆนๅ
'link'(ๆฌๅฐ้ช่ฏbash-tool-turn็ฑ็บข่ฝฌ็ปฟ):ๆฒปๆฌๆนๅ:่ฎฉ runtime generation ไธ tsx ็
pathsๆๅฝฑ่ฝๅจๅไธๆจกๅๅนณ้ข(ๆบ็ ๅฏๅจ่งฃๆๅฐsrc),้ฟๅ ๅไธๅ ๅจ src/lib ไธคไธชๅนณ้ขๅๅฎไพๅไธๆฌกใๅฆๅคๅปบ่ฎฎๆ
bash-tool-turn(ๆๅ็ฑป็ๅฎๅทฅๅ ท่ฐ็จๅบๆฏ)็บณๅ ฅๆบ็ ๅฏๅจ/ๅๅธ็ๅฟ ่ฟ้จ็ฆโโๆฌๆฌกๅๅธๆพ็ถๆผๆไบๅฎใ(ๆณจๆๅฐ CONTRIBUTING ่ฏดๆๆไธๆฅๅๅค้จ PR,ๆ ๅจๆญค้ไธๅฏๅค็ฐ่ฏๆฎไธ่กฅไธ,ไพๅข้ๅ่้็บณใ)
Title
[Bug] Source launch defaults to runtime resolution mode, loading
dsh-toolstwice and breaking every tool call withCannot read properties of undefined (reading 'prepare')Environment
ddefc45fbc(0.1.6-alpha.2)pnpm dsh headless "..."andpnpm dsh web; both shipped headless and a custom web profile reproduceReproduction
ddefc45fbcand runpnpm installpnpm dsh headless "run echo hi via the bash tool"(orpnpm dsh weband call any tool)No new test needed โ the repo's own keyless replay reproduces it:
Current behavior
CLI output:
The session log shows
tool/callimmediately followed byturn/end:{"reason":{"kind":"error","error":{"message":"Cannot read properties of undefined (reading 'prepare')","code":"UNKNOWN"}}}The
bash-tool-turnsnapshot is red onddefc45fbc:Root cause
Commit 9ddef327a4 (shipped in 0.1.6-alpha.2) changed the non-packaged default resolution mode from
linktoruntime(profile-boot.ts#L263).Under the tsx source launch:
pathsresolves bare@deepseek-ai/dsh-toolstopackages/core/tools/srcexportsโlib/dsh-toolsend up in one process;TOOL_RUNTIME_SCHEDULERis aunique symbol, so each copy has a distinct symbol object with the same descriptionctx.tools[TOOL_RUNTIME_SCHEDULER].prepare(...)at tool-calls.ts#L170 isundefined, crashing every tool callInstrumentation evidence:
Expected behavior
Tool calls succeed under the default source launch (they did with the previous
linkdefault, before 9ddef32).Suggested fix
Minimal fix: restore
'link'as the non-packaged default (verified locally:bash-tool-turngoes red โ green):Proper fix: keep the runtime generation and the tsx
pathsprojection on a single module plane (source entries for source launches) so a package is never instantiated from bothsrc/andlib/.Also suggest gating source launches/releases on
bash-tool-turn(or an equivalent real-tool-call scenario) โ this release clearly missed it.(Noted CONTRIBUTING states external PRs are not accepted at the moment; posting the reproduction and patch here for the team to consider.)
All reactions