feat: adapt to DSH 0.1.7-alpha.1 and yield the read-only previews
DSH 0.1.7-alpha.1 is 1299 commits past 0.1.6-alpha.2 and rewrites four
contracts this plugin was built on. The peer floor moves to
^0.1.7-alpha.1 (semver's prerelease rule means ^0.1.6-alpha.2 can never
match a 0.1.7 prerelease); 0.1.6-alpha.2 and earlier stay on v0.19.1.
Released as 0.21.0-alpha.1 (dist-tag alpha).
Hard breaks:
- dsh-settings was rewritten: register(ns, schema) is gone, a form is
addressed by the plugin row's Loader entry id and read from the
module's exported Config. The preferences are merged into Config and
marked volatile — which requires DSH's own schemastery, because only
that build wraps a volatile field in the cosmokit reference the
loader's volatile commit walks. With the public package a settings
write reports success and revision 1 while the effective value never
changes.
- ui-primitives renamed its whole icon family (IconXxx14/16 ->
IconXxxRegular/Medium): 26 imported symbols, 17 files. The failing
mode is render-time, not load-time. Five call sites that relied on the
old 14px default now pass size={14} explicitly.
- Session format v4 rejects source.kind === 'plugin'; the side-chat
boundary injection now writes plugin:dsh-better-sidebar, the same kind
DSH's own v3->v4 migration produces, so historical threads survive.
Tool results moved to role 'tool' with top-level content/isError; all
four parsers accept both shapes.
- The client session snapshot dropped subagentsByParent/jobsBySession
and the on-demand subagent-catalog observation API. The Tasks page
reads projectionsBySession and a new jobs.list route.
Yields and convergence:
- The read-only previews go to DSH's documentpreview (Office->PDF, a
spreadsheet worker, zoom, per-directory refresh); editor.canOpen
refuses those 26 extensions. Markdown, HTML (with its sandbox
switches) and the editable code buffer stay.
- The host browser kind is desktop-profile-only now, so the web e2e
lanes expect no browser entry and assert its absence.
- Link takeover claims only urlTarget links and passes the rest to the
host, fixing a regression from the 0.1.6 round: the fallback pointed
at a 'browser' type the plugin no longer registers, so http links in
its own markdown did nothing.
Also fixed, found along the way:
- The file tree refreshes live (new directory watch over the plugin's
own socket), since the plugin owns the `files` kind.
- ctx.sessions.list has no `current` field at either tag; the three
readers were dead. They now use ctx.sidebarRight.mounted.
- package.json.files was missing lib/client-locale.js.
- Two genuinely dead call sites: sessions.openSubagent/open/
refreshSubagents do not exist on the current baseline, so the
topology click, the jump-back and the retry were all no-ops.
- The test harness window shim lacked addEventListener, which the 0.1.7
primitives call at module-evaluation time; and the e2e token exchange
needs Playwright's request stack, not Node's fetch.
This commit is contained in:
@@ -42,9 +42,9 @@ e2e_require_cmd() {
|
||||
# 缺省值(`dsh`)由调用方从环境变量取好传入。
|
||||
#
|
||||
# 回退的 npx 版本是显式钉死的:不钉就会解析 npm 的 `latest` dist-tag,而
|
||||
# 0.1.6 线目前只有预发布(`latest` 仍是 0.1.5-rc.2),冒烟会静静地挂到一
|
||||
# 0.1.7 线目前只有预发布(`latest` 仍是 0.1.5-rc.2),冒烟会静静地挂到一
|
||||
# 个插件已不支持的宿主上。钉版必须与 package.json 的 peer 下限同步。
|
||||
DSH_NPX_SPEC="${DSH_NPX_SPEC:-@deepseek-ai/dsh@0.1.6-alpha.2}"
|
||||
DSH_NPX_SPEC="${DSH_NPX_SPEC:-@deepseek-ai/dsh@0.1.7-alpha.1}"
|
||||
e2e_resolve_dsh_cmd() {
|
||||
local explicit="${DSH_CMD}"
|
||||
if ! command -v "$DSH_CMD" >/dev/null 2>&1; then
|
||||
@@ -59,13 +59,14 @@ e2e_resolve_dsh_cmd() {
|
||||
}
|
||||
|
||||
# 解析出的 CLI 版本必须与 peer 下限同一条支持线。这不是洁癖:宿主只比
|
||||
# 0.1.6-alpha.2 早一个预发布(alpha.1)时,`dsh plugin add` 的 bundle 协调
|
||||
# 会静默不写 `dsh.profile.bundles`——CLI 退出码仍是 0,lane 却挂在「挂载未
|
||||
# 注册」上,排查方向完全被带偏(本机 PATH 上的 dsh 恰好就是 alpha.1,实测)。
|
||||
# DSH_CMD 显式给出时不拦(调用方明确知道自己在挂什么),只告警。
|
||||
# 基线早一个预发布时,`dsh plugin add` 的 bundle 协调会静默不写
|
||||
# `dsh.profile.bundles`——CLI 退出码仍是 0,lane 却挂在「挂载未注册」上,
|
||||
# 排查方向完全被带偏(本机 PATH 上的 dsh 一直是上一版,0.1.6-alpha.1 与
|
||||
# 0.1.6-alpha.2 各实测过一次)。DSH_CMD 显式给出时不拦(调用方明确知道自
|
||||
# 己在挂什么),只告警。
|
||||
e2e_check_dsh_version() {
|
||||
local explicit="$1" actual expected
|
||||
expected="${DSH_EXPECT_VERSION:-0.1.6-alpha.2}"
|
||||
expected="${DSH_EXPECT_VERSION:-0.1.7-alpha.1}"
|
||||
# `dsh --version` 冷启动要走 npx,给足预算;拿不到版本就只告警。
|
||||
actual="$($DSH_CMD --version 2>/dev/null | tr -d '[:space:]' | head -c 64 || true)"
|
||||
case "$actual" in
|
||||
|
||||
+1
-1
@@ -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 dsh'
|
||||
printf 'npx -y --package @deepseek-ai/dsh@0.1.7-alpha.1 dsh'
|
||||
else
|
||||
die "未找到 dsh 或 npx。请先安装 DSH(并确保 Node/npm 可用),或用 DSH_CMD 指定 dsh 路径。"
|
||||
fi
|
||||
|
||||
Reference in New Issue
Block a user