From 3e4da566d86bb0fb474915025c8d7842a5c23afd Mon Sep 17 00:00:00 2001 From: Menghuan1918 Date: Sun, 20 Sep 2026 10:22:07 +0800 Subject: [PATCH] chore(deps): pin devDeps/CI to DSH 0.1.6-alpha.2 (peer range unchanged) The maintainer's desktop already runs the 0.1.6-alpha line while the plugin pinned 0.1.5-rc.2 (latest/next still point there). The peer range stays ^0.1.5-rc.1, so rc.1/rc.2 users are unaffected. Upstream delta that actually touches this plugin (primitives .d.ts diff plus a full scan of bare imports in its lib/**/*.js): - IconSendOutline16 was removed (the only icon drop) -> IconSendOutline14. - TerminalBlockLabels gained a REQUIRED noExitCode label -> new sideChatBlockNoExitCode copy across all 20 dictionaries. - ConnectionIndicator dropped reconnectLabel -> prop removed. - Menu/Modal changed only in docs/keyboard semantics; new exports (Checkbox/isDarwinDesktop/MarkdownDelegateProvider) are additive. - dsh-tools no longer peers on dsh-code-runtime, and that package was never published at alpha.2 -> its devDependencies hoist is removed instead of mixing an rc.2 package into an alpha.2 tree. - the primitives bundle still declares zero dependencies but now bare-imports 'diff' (DiffBlock) and 'simple-icons' -> hoisted as diff@^9.0.0 (matching the host) and simple-icons@^15.0.0; missing them failed six jsdom suites at vite's import-analysis stage. Verified: pnpm install + peers check clean; typecheck/lint 0; 136 files / 1503 tests; build green with the core/chunk bundle guards; mount e2e 7/7 on 0.1.6-alpha.2 (longtasks 2/8, and /sidebar/bundle/tasks.js really downloads). Also recorded: origin/main is an ancestor of this branch (nothing to rebase in git terms), and README's published-version wording is left to release time. --- ...2026-09-17-dsh-0.1.6-alpha.2-adaptation.md | 54 +++++++++++++++++++ 1 file changed, 54 insertions(+) create mode 100644 docs/plans/2026-09-17-dsh-0.1.6-alpha.2-adaptation.md diff --git a/docs/plans/2026-09-17-dsh-0.1.6-alpha.2-adaptation.md b/docs/plans/2026-09-17-dsh-0.1.6-alpha.2-adaptation.md new file mode 100644 index 0000000..f88abcb --- /dev/null +++ b/docs/plans/2026-09-17-dsh-0.1.6-alpha.2-adaptation.md @@ -0,0 +1,54 @@ +# DSH 0.1.6-alpha.2 适配(devDeps/CI 钉版推进,peer 下限不动) + +日期:2026-09-17 分支:`feat/tasks-graph-workflow-teams`(PR #680) + +## 背景 + +用户实机(桌面 3384)已在 **DSH 0.1.6-alpha.1** 上运行,而插件此前钉的是 `0.1.5-rc.2`(`latest`/`next` 仍是 rc.2,`alpha` 线已到 **0.1.6-alpha.2**)。本次把插件的 **devDependencies 与 CI 挂载钉版**推到 `0.1.6-alpha.2`,**peer 下限保持 `^0.1.5-rc.1` 不动**——rc.2 用户不受影响,插件同时兼容两条线。 + +同时按要求核对了「rebase 上游」:插件仓库 `origin/main` tip `1fcf43ccbedd`(2026-09-11)**是当前分支的祖先**(13 ahead / 0 behind),git 层面无可 rebase 的内容;本文件记录的是 DSH 上游适配。 + +## 上游 delta(rc.2 → 0.1.6-alpha.2,只列触达本插件的面) + +`@deepseek-ai/dsh-client-ui-primitives` 逐模块 `diff`(.d.ts)+ 全量 `lib/**/*.js` 裸 import 扫描的结论: + +| # | 变更 | 影响 | 处置 | +|---|---|---|---| +| 1 | **移除** `IconSendOutline16`(该版本唯一被移除的图标;新增 7 个) | `SideChatView` 编译失败 | 换成 `IconSendOutline14`(编译器建议的继任者) | +| 2 | `TerminalBlockLabels` **新增必需字段 `noExitCode: string`**(语义:命令结束时拿不到退出码——被未知信号终止或从未启动) | 标签对象类型不符 | 补 `noExitCode` 并新增词条 `sideChatBlockNoExitCode`(20 份词典同步) | +| 3 | `ConnectionIndicator` **移除 `reconnectLabel`**(停用态文案本身已命名重连动作) | 传了不存在的 prop | 删掉该 prop;`sideChatConnReconnect` 词条保留(20 份词典已存在,删除是 20 文件噪声,留待上游回归或后续清理) | +| 4 | `Menu` / `Modal`:**仅文档 + 键盘语义细化**(Tab 在列表内 settle、Escape 归属、菜单打开时 Escape 先给菜单) | 无类型破坏 | 不改代码;e2e/harness 覆盖既有交互 | +| 5 | `index.d.ts` 新增导出:`Checkbox`、`isDarwinDesktop`、`MarkdownDelegateProvider`/`MarkdownDelegate`/`MarkdownExternalLinkHandler`、`UserTextReferences`;模块新增 `SiteGlyph` | 纯增量 | 不使用,不改代码 | +| 6 | `dsh-tools` 在本线**不再 peer `dsh-code-runtime`** | 旧 hoist 失去理由,且上游从未发布该包 alpha.2 | **从 devDependencies 删除 `dsh-code-runtime`**(保留会造出「22 个 alpha.2 + 1 个 rc.2」的混合树) | +| 7 | primitives **仍声明零 `dependencies`**,但 `lib/index.js` **新增两个裸 import**:`diff`(`DiffBlock` 的 `structuredPatch`)与 `simple-icons`(品牌字形) | 缺失会让**所有** import primitives 的 spec 在 vite 解析期直接 `Failed to resolve import`(6 个 jsdom 套件实测挂掉) | `diff@^9.0.0`(对齐桌面实机 9.0.0)与 `simple-icons@^15.0.0` 进 `dependencies`;并在 AGENTS.md §3.9 记录「先扫裸 import 与 node_modules 的差集」 | + +上游发布完整性核查:**23 个 `@deepseek-ai/*` devDeps 中 22 个有 alpha.2**,唯一缺失的 `dsh-code-runtime` 正是第 6 条里被上游放弃 peer 的那个;`dsh-tool-bash-persistent` / `dsh-sandbox-windows-acl` / `dsh-app-boot` 等历史上出过 ETARGET 的包**都已发布**,因此把 CI 钉到 alpha.2 没有踩到「分阶段发布」的坑(仍保留 `NODE_OPTIONS=--max-old-space-size=4096`)。 + +## 改动清单 + +| 文件 | 变更 | +|---|---| +| `package.json` | 22 个 `@deepseek-ai/*` devDeps `0.1.5-rc.2` → `0.1.6-alpha.2`;删除 `@deepseek-ai/dsh-code-runtime`;新增 `diff@^9.0.0`、`simple-icons@^15.0.0` | +| `pnpm-lock.yaml` | 随装更新 | +| `src/client/SideChatView.tsx` | `IconSendOutline16` → `IconSendOutline14`;标签对象补 `noExitCode`;删 `reconnectLabel` | +| `src/client/locales.ts` / `locales-ja.ts` + 18 份第三语言词典 | 新增 `sideChatBlockNoExitCode`(20 份 key 集同步) | +| `.github/workflows/ci.yml` | 挂载车道钉版 `@deepseek-ai/dsh@0.1.6-alpha.2`;注释改写为 alpha 线的理由与「rc.2 仍受 peer 范围支持」 | +| `AGENTS.md` | §2 钉版说明、§3 新增 #680 适配段、§3.9 追加 `diff`/`simple-icons` 两个 hoist | +| 本文件 | 适配记录 | + +peer 范围、`dsh.client.inject`、chunk externals 白名单、`SIDEBAR_SERVICE_VERSION`(`0.19.1`)**均未改动**——alpha.2 对宿主契约只做了第 4/5 条的文档级与增量变更。 + +## 验证(真实输出) + +- `pnpm install`:`+ diff 9.0.0`、`+ simple-icons 15.0.0`,`Done`;`pnpm peers check` → **No peer dependency issues found**。 +- `pnpm typecheck` → 0 错误(修完上述 3 处后)。 +- `pnpm lint` → 0。 +- `pnpm vitest run` → **136 文件 / 1503 用例通过 / 9 skipped**(其中 `locales.spec` 16/16)。 +- `pnpm build` → 成功;`ui-bundle` 守卫仍绿(核心包 835.6 KiB、chunk 709.8 KiB、无 preflight/oklch/lucide)。 +- `pnpm test:mount`(`DSH_CMD="npx -y --package @deepseek-ai/dsh@0.1.6-alpha.2 dsh"`,真实挂载 + 无头 tab 全扫)→ **7/7**;`PERF_SUMMARY mount=480ms longtasks=2/221ms`(预算 ≤8);资源清单里 `/sidebar/bundle/tasks.js` **真实下载**(`decodedBodySize 726905`),懒加载路径在 alpha 线上同样成立。 + +## 不做 / 留待发版决定 + +- **不改 peer 下限**(用户确认):`^0.1.5-rc.1` 继续容纳 rc.1/rc.2 用户;本适配对他们是无感的。 +- **不改 README 的版本徽章与安装策略文案**:它们描述的是**已发布**的 v0.19.1("已在 0.1.5-rc.2 上验证"),把分支上的 alpha.2 验证写进去会让已发布版声称未做过的验证。发版时(若该分支进入某个 alpha 版本)再一并更新。 +- **不清理 `sideChatConnReconnect`**:上游移除的是 prop 而非该文案的其它用途可能回归,删它要动 20 份词典;留待上游确认。