chore(dsh): adapt to DSH 0.2.3-alpha.2 and drop pre-0.2.3 compatibility
Raise the whole baseline to the alpha line and stop carrying code that only exists for older hosts (no runtime compatibility layer, per AGENTS §4): - peers/engines: 14 DSH peers and engines.dsh -> 0.2.3-alpha.2, Cordis -> 4.2.0-alpha.1, group/include 1.2.0-alpha.1, schemastery 3.20.0-alpha.1; dev pins and CI/e2e/install scripts move with them; plugin version 0.34.0-alpha.0. - admission: DSH 0.2.3 deleted `requestRejection`, so only the injected `connection.authentication` provider can call `admit`; the legacy branch and the direct-admit fallback are gone and the fence fails loudly. - directory events: the projection authority is `workspace-root/change`; the side-chat cwd stamp emits it and the worktree scan no longer reads the retired `working-directory/change`. - llm types: `@deepseek-ai/dsh-llm` no longer exports `./brand`, so MessageId comes from `./types`. - client anchors: only `[data-slot="main.conversation"]`; the alpha.1 `conversation` key is retired. `webServer.getOrigin` is called directly. Gates: peers check, typecheck, lint, test (366 files / 4615 passed), build, check:consumer-types.
This commit is contained in:
1 parent
d7e525471e
commit
795beabe22
39 files changed
+973
-973
No files matched your search
@@ -59,7 +59,7 @@ const effects = []
|
||||
const routes = []
|
||||
const registry = { get: id => (id === 'ws-1' ? { path: workspace } : undefined) }
|
||||
const ctx = {
|
||||
connection: { requestRejection: () => undefined },
|
||||
connection: { admit: () => ({ peer: null }) },
|
||||
webServer: {
|
||||
register(route) {
|
||||
routes.push(route)
|
||||
@@ -75,7 +75,8 @@ const ctx = {
|
||||
const cleanup = fn()
|
||||
if (typeof cleanup === 'function') effects.push(cleanup)
|
||||
},
|
||||
inject() {
|
||||
inject(deps, callback) {
|
||||
if (deps.includes('connection.authentication')) callback({ connection: { admit: () => ({ peer: null }) } })
|
||||
return () => {}
|
||||
},
|
||||
on() {
|
||||
|
||||
@@ -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.3}"
|
||||
DSH_NPX_SPEC="${DSH_NPX_SPEC:-@deepseek-ai/dsh@0.2.3-alpha.2}"
|
||||
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.3}"
|
||||
expected="${DSH_EXPECT_VERSION:-0.2.3-alpha.2}"
|
||||
# `dsh --version` 冷启动要走 npx,给足预算;拿不到版本就只告警。
|
||||
actual="$($DSH_CMD --version 2>/dev/null | tr -d '[:space:]' | head -c 64 || true)"
|
||||
case "$actual" in
|
||||
|
||||
+2
-2
@@ -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.3
|
||||
# DSH_CMD 默认优先 PATH 上的 dsh,缺省回退 npx -y --package @deepseek-ai/dsh@0.2.3-alpha.2
|
||||
#
|
||||
# 说明:
|
||||
# - 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.3', 'dsh', 'plugin', '--profile', $Profile, 'add', "$PKG@$SPEC")
|
||||
$cliArgs = @('-y', '--package', '@deepseek-ai/dsh@0.2.3-alpha.2', '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.3
|
||||
# DSH_CMD 默认优先用 PATH 上的 `dsh`,缺省回退 npx -y --package @deepseek-ai/dsh@0.2.3-alpha.2
|
||||
#
|
||||
# 说明:
|
||||
# - 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.3 dsh'
|
||||
printf 'npx -y --package @deepseek-ai/dsh@0.2.3-alpha.2 dsh'
|
||||
else
|
||||
die "未找到 dsh 或 npx。请先安装 DSH(并确保 Node/npm 可用),或用 DSH_CMD 指定 dsh 路径。"
|
||||
fi
|
||||
|
||||
Reference in new issue
Block a user