You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Context: I'm the developer of dsh-acp, a community (third-party) plugin that bridges ACP clients (Zed, VS Code) to dsh agents. I hit this while distributing my plugin as a profile bundle — this blocks any third-party bundle that isn't shipped inside dsh's own node_modules.
Bug: third-party profile bundles fail to load — runProfile does not pass bareModuleBaseUrl to boot()
Version:@deepseek-ai/dsh@0.1.1-rc.2 (latest on npm), Node.js v20.19.0, macOS
Summary
A profile that declares a third-party bundle (a community plugin not shipped inside dsh's own node_modules) crashes at startup with ERR_MODULE_NOT_FOUND, even though the package is correctly installed in the profile's node_modules. Built-in bundles (@deepseek-ai/dsh-base, etc.) load fine because they resolve from dsh's own install tree.
Reproduction
Create a profile with a third-party bundle, e.g. ~/.dsh/profiles/acp/package.json:
— without the 5th argument bareModuleBaseUrl. Consequently mountRootInclude (in @deepseek-ai/dsh-app-boot) installs the plain Include builtin instead of HostResolvedRootInclude, and Include.import() resolves bare package names with a plain dynamic import() from the loader module's own location (cordis-plugin-loader/lib/index.js). Node's resolution then only walks dsh's install tree and never sees ~/.dsh/profiles/<profile>/node_modules, so third-party bundles can never be found.
The bareModuleBaseUrl parameter appears to be designed exactly for this ("optional installed-host base for bare package names"), but the CLI never wires it up.
Suggested fix
Pass the profile directory as the bare-module base when booting a profile, e.g.:
so that bare specifiers resolve against the profile's node_modules (including the healed ~/.dsh/profiles/node_modules fallback).
Workaround
Globally installing/linking the third-party bundle (e.g. npm i -g dsh-acp) places it in the global node_modules, which happens to be in the loader's upward node_modules chain for a globally installed dsh. This unblocks local development but is not viable for distributing a plugin to end users — npm i -g dsh-acp shouldn't be a prerequisite for dsh --profile acp to work.
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
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: third-party profile bundles fail to load —
runProfiledoes not passbareModuleBaseUrltoboot()Version:
@deepseek-ai/dsh@0.1.1-rc.2(latest on npm), Node.js v20.19.0, macOSSummary
A profile that declares a third-party bundle (a community plugin not shipped inside dsh's own
node_modules) crashes at startup withERR_MODULE_NOT_FOUND, even though the package is correctly installed in the profile'snode_modules. Built-in bundles (@deepseek-ai/dsh-base, etc.) load fine because they resolve from dsh's own install tree.Reproduction
~/.dsh/profiles/acp/package.json:{ "name": "dsh-profile-acp", "private": true, "dependencies": { "dsh-acp": "link:/path/to/dsh-acp" }, "dsh": { "profile": { "bundles": ["@deepseek-ai/dsh-base", "dsh-acp"] } } }Run
dsh --profile acp(or spawn it via an ACP client).The process exits with code 1:
Root cause
runProfile(lib/profile-boot-*.js) calls:— without the 5th argument
bareModuleBaseUrl. ConsequentlymountRootInclude(in@deepseek-ai/dsh-app-boot) installs the plainIncludebuiltin instead ofHostResolvedRootInclude, andInclude.import()resolves bare package names with a plain dynamicimport()from the loader module's own location (cordis-plugin-loader/lib/index.js). Node's resolution then only walks dsh's install tree and never sees~/.dsh/profiles/<profile>/node_modules, so third-party bundles can never be found.The
bareModuleBaseUrlparameter appears to be designed exactly for this ("optional installed-host base for bare package names"), but the CLI never wires it up.Suggested fix
Pass the profile directory as the bare-module base when booting a profile, e.g.:
so that bare specifiers resolve against the profile's
node_modules(including the healed~/.dsh/profiles/node_modulesfallback).Workaround
Globally installing/linking the third-party bundle (e.g.
npm i -g dsh-acp) places it in the globalnode_modules, which happens to be in the loader's upwardnode_moduleschain for a globally installed dsh. This unblocks local development but is not viable for distributing a plugin to end users —npm i -g dsh-acpshouldn't be a prerequisite fordsh --profile acpto work.All reactions