fix(host): 准入改用 admit 兜底,运行侧钉版抬到 rc.3
DSH 0.2.2-rc.3 之后官方删除 connection.requestRejection(升级指南写明用 admit 替代),插件此前每个请求第一句就抛 TypeError,被宿主兜底成空 body 的 400。 fence 改为:requestRejection 存在时照旧调用,缺席时改调 admit 读同一个 rejection 字段,两者都没有仍抛 TypeError,不重建信任表。 engines.dsh 已要求 rc.3,因此把真正运行插件的钉版同批抬到 rc.3:CI 的 npm install -g、e2e-common.sh 的 DSH_NPX_SPEC / expected、两个独立安装脚本的 npx 回退。dev 钉版与 14 条 peer 仍是 rc.2(rc.3 与本插件消费面无 API 差异), tests/dsh-baseline.spec.ts 相应拆成两个常量。 关联 #1204。
This commit is contained in:
1 parent
be5dbb6db2
commit
6024337a73
11 files changed
+65
-16
No files matched your search
@@ -44,7 +44,7 @@ e2e_require_cmd() {
|
||||
# 回退的 npx 版本是显式钉死的:不钉就会解析 npm 的 dist-tag,可能静默挂到
|
||||
# 插件不支持的宿主上。**必须写精确版本,不能写 `@next`/`@alpha` 等 dist-tag**。
|
||||
# 该版本必须与 package.json 的 DSH peer 基线同步。
|
||||
DSH_NPX_SPEC="${DSH_NPX_SPEC:-@deepseek-ai/dsh@0.2.2-rc.2}"
|
||||
DSH_NPX_SPEC="${DSH_NPX_SPEC:-@deepseek-ai/dsh@0.2.2-rc.3}"
|
||||
e2e_resolve_dsh_cmd() {
|
||||
local explicit="${DSH_CMD}"
|
||||
if ! command -v "$DSH_CMD" >/dev/null 2>&1; then
|
||||
@@ -66,7 +66,7 @@ e2e_resolve_dsh_cmd() {
|
||||
# 己在挂什么),只告警。
|
||||
e2e_check_dsh_version() {
|
||||
local explicit="$1" actual expected
|
||||
expected="${DSH_EXPECT_VERSION:-0.2.2-rc.2}"
|
||||
expected="${DSH_EXPECT_VERSION:-0.2.2-rc.3}"
|
||||
# `dsh --version` 冷启动要走 npx,给足预算;拿不到版本就只告警。
|
||||
actual="$($DSH_CMD --version 2>/dev/null | tr -d '[:space:]' | head -c 64 || true)"
|
||||
case "$actual" in
|
||||
|
||||
+3
-3
@@ -1,4 +1,4 @@
|
||||
## =============================================================================
|
||||
## =============================================================================
|
||||
# dsh-better-sidebar 一键安装脚本(官方 CLI 方式,Windows PowerShell 5.1+ / pwsh)
|
||||
#
|
||||
# 通过 DSH 官方插件命令安装 npm 包并自动挂载:
|
||||
@@ -28,7 +28,7 @@
|
||||
# 环境变量(均可省略):
|
||||
# DSH_HOME 默认 %USERPROFILE%\.dsh
|
||||
# REGISTRY 默认 https://registry.npmjs.org
|
||||
# DSH_CMD 默认优先 PATH 上的 dsh,缺省回退 npx -y --package @deepseek-ai/dsh@0.2.2-rc.2
|
||||
# DSH_CMD 默认优先 PATH 上的 dsh,缺省回退 npx -y --package @deepseek-ai/dsh@0.2.2-rc.3
|
||||
#
|
||||
# 说明:
|
||||
# - pnpm 11 的 minimumReleaseAge 会拒绝发布 <24h 的新版本。脚本会预写
|
||||
@@ -174,7 +174,7 @@ Ensure-WorkspaceSettings
|
||||
if ($CLI -eq 'dsh') {
|
||||
$cliArgs = @('plugin', '--profile', $Profile, 'add', "$PKG@$SPEC")
|
||||
} else {
|
||||
$cliArgs = @('-y', '--package', '@deepseek-ai/dsh@0.2.2-rc.2', 'dsh', 'plugin', '--profile', $Profile, 'add', "$PKG@$SPEC")
|
||||
$cliArgs = @('-y', '--package', '@deepseek-ai/dsh@0.2.2-rc.3', 'dsh', 'plugin', '--profile', $Profile, 'add', "$PKG@$SPEC")
|
||||
}
|
||||
Say "执行 $CLI plugin --profile $Profile add $PKG@$SPEC ..."
|
||||
$addOut = & $CLI @cliArgs 2>&1
|
||||
|
||||
+2
-2
@@ -24,7 +24,7 @@
|
||||
# 环境(均可省略,脚本会自动探测):
|
||||
# DSH_HOME 默认 ~/.dsh(Windows Git Bash 下回退 $USERPROFILE/.dsh)
|
||||
# REGISTRY 默认 https://registry.npmjs.org(发布源;装依赖仍走 pnpm 配置)
|
||||
# DSH_CMD 默认优先用 PATH 上的 `dsh`,缺省回退 npx -y --package @deepseek-ai/dsh@0.2.2-rc.2
|
||||
# DSH_CMD 默认优先用 PATH 上的 `dsh`,缺省回退 npx -y --package @deepseek-ai/dsh@0.2.2-rc.3
|
||||
#
|
||||
# 说明:
|
||||
# - pnpm 11 的 minimumReleaseAge 会拒绝发布 <24h 的新版本。脚本会预写
|
||||
@@ -140,7 +140,7 @@ dsh_cli() {
|
||||
if command -v "$DSH_CMD" >/dev/null 2>&1; then
|
||||
printf '%s' "$DSH_CMD"
|
||||
elif command -v npx >/dev/null 2>&1; then
|
||||
printf 'npx -y --package @deepseek-ai/dsh@0.2.2-rc.2 dsh'
|
||||
printf 'npx -y --package @deepseek-ai/dsh@0.2.2-rc.3 dsh'
|
||||
else
|
||||
die "未找到 dsh 或 npx。请先安装 DSH(并确保 Node/npm 可用),或用 DSH_CMD 指定 dsh 路径。"
|
||||
fi
|
||||
|
||||
Reference in new issue
Block a user