Tools fail to execute on a source build of dsh 0.1.6-alpha.2 (Cannot read properties of undefined (reading 'prepare')), and switching versions without a clean rebuild breaks the typert/tool layer #7086
Replies: 6 comments 1 reply
|
我也是同样的问题,整个都重装了都没用 |
|
Root cause found + one-line fix. Under the source launch, Verified on Patch applied and running on my fork: |
|
看来和我遇到的是同一个问题。 |
|
node=v24.19.0
pnpm=11.17.0
npx @deepseek-ai/dsh web
一键安装和源码安装都使用过,为了解决这个问题,两种方式都完全卸载并清理过,但是无论如何重装,清理,都不能解决这个问题。
Rupert
***@***.***
|
|
同样的问题, |
|
Independent verification of the Confirming @kristhianmanue1's root cause: under a source launch over a built tree,
Fix commit (also carries install-anchor realpath canonicalization for module-fallback declarers): HaipingShi@74c4baf83d — happy to rebase just the one-liner into a clean patch if that is easier to take. Checked today on One caveat for readers of this thread: the fix stops new crashes but does not repair sessions already poisoned by an orphaned |
Uh oh!
There was an error while loading. Please reload this page.
Environment
0.1.6-alpha.2(tagdsh-v0.1.6-alpha.2, commitddefc45fbc); control:0.1.5-rc.2(tagdsh-v0.1.5-rc.2, commitfb2c4b9e69)v26.8.2(also seenv25.9.0), pnpm11.7.0pnpm install && pnpm run clean && pnpm run build, thenpnpm dsh --profile headless "..."/pnpm dsh webopencode-go/opencode-go-extravia@deepseek-ai/dsh-llm-pi-ai(also reproduces with the default profile model)Summary
Two distinct problems present as "tools don't work":
tool_call, then the run dies withCannot read properties of undefined (reading 'prepare').0.1.5-rc.2with the same setup works.typert-loader errors.
Problem 1 — 0.1.6-alpha.2 tool execution
Steps
Actual
stderr:
dsh: UNKNOWN: Cannot read properties of undefined (reading 'prepare')Expected
The bash tool executes and its result returns to the model.
Notes
toolsarray and the model calls it), so registration/schema assembly works; the failure is at dispatch/prepare time.packages/core/agent-loop/src/tool-calls.ts,startCall()→ctx.tools[TOOL_RUNTIME_SCHEDULER].prepare(call.exec).ctx.tools[TOOL_RUNTIME_SCHEDULER]appears to beundefined, i.e. theToolRuntimescheduler symbol face is not reachable on the service instance.TOOL_RUNTIME_SCHEDULERis a unique symbol defined in@deepseek-ai/dsh-tools. I verified that resolution from the repo root,packages/core/agent-loop/lib,apps/cli/src, and~/.dsh/profiles/weball point to the samepackages/core/tools/lib/index.js, so this does not look like a duplicated-module symbol mismatch in this tree.refactor(ptc): align runtime packages and services with PTC naming, code-runtime work), so this may be a scheduler-wiring regression.Control (works)
Problem 2 — stale generated artifacts across version switches
Switching from a built 0.1.6-alpha.2 tree to 0.1.5-rc.2 source without
pnpm run clean && pnpm run buildmakes boot fail:The generated
lib/typert.*.jsmanifests carry the older{ mode, typeSymbol, create }codec, while the checked-out loader requires{ mode, typeSymbol, schema }(zod v4). A clean rebuild regenerates them consistently (schema:for 0.1.5-rc.2,create:for 0.1.6-alpha.2).Workaround
pnpm run clean && pnpm install && pnpm run build.EADDRINUSEon127.0.0.1:3080andlib/deleted under a live process.dsh-v0.1.5-rc.2.Questions
preparefailure a known regression? Is a fix in progress, or is there a wiring/ctx.get('tools')workaround?lib/artifacts?All reactions