chore(dsh): 适配 DSH 0.2.2-rc.1(基线/peer/CI/脚本/文档 + AgentModel 与 PTC 类型变化)

This commit is contained in:
Menghuan1918 committed 2026-11-04 22:13:07 +08:00
1 parent 09b83cc6aa
commit 7a4a15292e
25 files changed
+844 -679

No files matched your search

+3 -3
View File
@@ -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.1-rc.1}"
DSH_NPX_SPEC="${DSH_NPX_SPEC:-@deepseek-ai/dsh@0.2.2-rc.1}"
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.1-rc.1}"
expected="${DSH_EXPECT_VERSION:-0.2.2-rc.1}"
# `dsh --version` 冷启动要走 npx,给足预算;拿不到版本就只告警。
actual="$($DSH_CMD --version 2>/dev/null | tr -d '[:space:]' | head -c 64 || true)"
case "$actual" in
@@ -165,7 +165,7 @@ EOF
# 后台启动 dsh web(--port 0 = OS 分配,避免端口冲突;keyless 可起)。
# `--no-open` 是必须的:宿主默认会在启动后打开系统浏览器,本地反复跑这条
# lane 会不断弹窗(CI 是无头环境不受影响,本地开发机不是)。基线宿主
# 0.2.1-rc.1 的 web app 已提供该 flag(@deepseek-ai/dsh-web-app/lib/startup.js)。
# 0.2.2-rc.1 的 web app 已提供该 flag(@deepseek-ai/dsh-web-app/lib/startup.js)。
# $1 = stdout 日志;$2 = stderr 日志(缺省合并进 $1:mount lane 单文件,
# aggregate lane 分 out/err 两个文件)。写入全局 SERVER_PID。
e2e_start_dsh_web() {
+1 -1
View File
@@ -29,7 +29,7 @@ assert(hostRootOption, '--host-root is required (directory containing node_modul
const hostRoot = resolve(hostRootOption)
const tools = join(hostRoot, 'node_modules')
const hostPackage = JSON.parse(readFileSync(join(tools, '@deepseek-ai/dsh/package.json'), 'utf8'))
assert.equal(hostPackage.version, '0.2.1-rc.1', 'preinstalled host must be 0.2.1-rc.1')
assert.equal(hostPackage.version, '0.2.2-rc.1', 'preinstalled host must be 0.2.2-rc.1')
const channel = option('--channel')
const require = createRequire(join(root, 'package.json'))
const { chromium, request, expect } = require('@playwright/test')
+2 -2
View File
@@ -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.1-rc.1
# DSH_CMD 默认优先 PATH 上的 dsh,缺省回退 npx -y --package @deepseek-ai/dsh@0.2.2-rc.1
#
# 说明:
# - 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.1-rc.1', 'dsh', 'plugin', '--profile', $Profile, 'add', "$PKG@$SPEC")
$cliArgs = @('-y', '--package', '@deepseek-ai/dsh@0.2.2-rc.1', 'dsh', 'plugin', '--profile', $Profile, 'add', "$PKG@$SPEC")
}
Say "执行 $CLI plugin --profile $Profile add $PKG@$SPEC ..."
$addOut = & $CLI @cliArgs 2>&1
+2 -2
View File
@@ -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.1-rc.1
# DSH_CMD 默认优先用 PATH 上的 `dsh`,缺省回退 npx -y --package @deepseek-ai/dsh@0.2.2-rc.1
#
# 说明:
# - 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.1-rc.1 dsh'
printf 'npx -y --package @deepseek-ai/dsh@0.2.2-rc.1 dsh'
else
die "未找到 dsh 或 npx。请先安装 DSH(并确保 Node/npm 可用),或用 DSH_CMD 指定 dsh 路径。"
fi