Bug: dsh plugin add 会静默安装 host peer 范围无法满足的插件(dsh-win32 实测,零 warning) #6680
Replies: 3 comments
|
补一个一键复现脚本(下面的输出是本机刚跑出来的,不是推测)。它把 #!/usr/bin/env bash
# dsh plugin add silently accepts a plugin whose @deepseek-ai/* peer range cannot be satisfied.
set -eu
ROOT="$(mktemp -d)"
export DSH_HOME="$ROOT/home"
GLOBAL="$(npm root -g)"
HOST="$GLOBAL/@deepseek-ai/dsh/node_modules/@deepseek-ai/dsh-subprocess-local/package.json"
echo '== 1. install (watch for any peer warning) =='
dsh plugin --profile web add dsh-win32
echo
echo '== 2. what the plugin declares =='
node -e "console.log(require('$ROOT/home/profiles/web/node_modules/dsh-win32/package.json').peerDependencies)"
echo
echo '== 3. what the host actually provides =='
node -e "console.log('@deepseek-ai/dsh-subprocess-local', require('$HOST').version)"
echo
echo "DSH_HOME=$DSH_HOME (cleanup: rm -rf $ROOT)"本机输出(关键部分): 环境:dsh |
|
核实(master c291e79):机制成立——CLI 零 peer 校验 + 模板
你的建议 1 落点具体:在 |
|
Thanks @ciceroyang — replying here also to the original mention in #4792. The subprocess peer pin is intentional, not a forgotten version bump. In dsh-win32 0.17.8, On current DSH / native Windows, the intended path is the standalone CLI: npx dsh-win32 setupIt checks the official Windows stack without installing the legacy bundle or replacing the current preset. The missing upstream warning is a separate issue. I independently checked npm's 0.17.8 metadata and inspected the installer source at c291e7961. I have not rerun your installer reproduction, and our component verifier does not exercise that installer or a complete Minimal session. The peers are optional; that permits absence, not treating a conflicting present host provider as compatible. Any host-aware check should use the actual resolution context and report unresolved identity as unknown rather than infer compatibility from registry latest. Node |
Uh oh!
There was an error while loading. Please reload this page.
TL;DR (English)
dsh plugin addinstalls a plugin whose declared@deepseek-ai/*peer range cannot be satisfied, and prints no warning. Verified withdsh-win32@0.17.8: it declares@deepseek-ai/dsh-subprocess-local: ">=0.1.0-rc.5 <0.1.0-rc.7", while the host layer provides0.1.5-rc.2.环境
0.1.5-rc.1(npm-global)、pnpm11.21.0、macOS、Node v26.4.0dsh-win32@0.17.8(npm 元数据里的 peerDependencies 如下)复现(隔离 DSH_HOME,不动真实环境)
host 层由 CLI 自带安装提供(
<DSH_HOME>/profiles/node_modules/@deepseek-ai/…),实际版本:@deepseek-ai/cordis@deepseek-ai/dsh-fs-local@deepseek-ai/dsh-fs-sandbox@deepseek-ai/dsh-subprocess-localdsh-win32@0.17.8声明:{ "@deepseek-ai/cordis": ">=4.0.0 <5", "@deepseek-ai/dsh-fs-local": ">=0.1.0-rc.5 <0.2.0", "@deepseek-ai/dsh-fs-sandbox": ">=0.1.0-rc.5 <0.2.0", "@deepseek-ai/dsh-subprocess-local": ">=0.1.0-rc.5 <0.1.0-rc.7" }第四条与已装
0.1.5-rc.2明确冲突(0.1.5-rc.2 > 0.1.0-rc.7,严格 semver 同样排除)。安装输出没有任何 warning:同样现象用一个人造插件也能复现:peer 写
>=99.0.0、link:安装进去,零警告。机制:为什么 pnpm 没有报警
装完后 profile 里没有
@deepseek-ai/*(ls <profile>/node_modules只有dsh-win32 / iconv-lite / safer-buffer)。profile 的 pnpm 配置是:host 包是由 CLI 的共享根层提供的,不是 profile 的依赖。于是:
autoInstallPeers: false→ pnpm 不安装这些 peer;pnpm ls --depth 0只列出dsh-win32@0.17.8,无 peer 警告)。再叠加 host 包目前不发布
engines(#2259),npm/pnpm 两层都没有机会报警。影响
安装时用户拿不到任何「这个插件与当前 harness 不兼容」的信号;冲突要么在运行时以更难懂的方式暴露,要么无人发现。对由宿主提供的
@deepseek-ai/*peer 来说,声明目前实际上是装饰性的。建议(任选,均不要求改 npm 生态)
dsh plugin add在写 profile 之前读取插件声明的@deepseek-ai/*peer 范围,与 host 层实际解析到的版本比对,不满足就打印 warning(不建议直接阻断:生态里大量插件声明*,硬拦会挡住正常安装);@deepseek-ai/*作为 profile 的 peer 解析目标),交给 pnpm 自己报;ciceroyang/peer_range,同一台机器上对dsh-win32的输出是:相关讨论:#4792(插件 × harness 兼容性标准化)。
All reactions