Skip to content

v1.2.0 — 支持 DSH 0.2.0

Latest

Choose a tag to compare

@jiangzhenguo jiangzhenguo released this 30 Sep 09:32
· 6 commits to main since this release

支持 DSH 0.2.0

本次发布的实质内容只有一个 —— 放宽 peer 版本上限。插件代码本身在 DSH 0.2.0 上原本就能跑,真正卡住安装的是版本门槛。

为什么之前装不上

DSH 0.2.0 起会在安装前校验 peerDependencies 中每个 @deepseek-ai/dsh* 范围:

semver.satisfies(runtimeVersion, requirement, { includePrerelease: true })

不满足就 直接拒绝安装(incompatible-version),不是警告。原有的上限 <0.2.0-0 把所有 0.2.x 预发布版一并排除 —— 而 <0.2.0-0 本身就已是「小于 0.2.0 的预发布」,多加的 -0 让边界更严。

修了什么

  • package.json:dsh-tools / dsh-llm 上限 <0.2.0-0 → <0.3.0-0,0.1.x 与 0.2.x 共用一份代码
  • lib/index.js:补跨版本契约文档(无行为变更)。0.2.0 的 ToolCallView 变为可辨识联合 'generic' | 'terminal' | 'diff',本插件返回的字面量 card: 'terminal' 本就满足
  • test/:原 harness 用桩替换了 defineTool,恰好绕过风险面;现改为解析真实的 dsh-tools/dsh-llm,并新增第 0 节安装门槛守卫(断言每个 peer 范围放行 0.2.0/0.2.0-rc.2/0.2.5)与第 4b 节 ToolDefinition 契约断言
  • CI:双版本矩阵 0.1.5-rc.3 + 0.2.0-rc.2

验证

  • 两条 DSH 线各 56/56 通过
  • 对真实的 0.2.0 gate 函数实测:0.2.0-rc.2、0.2.0(GA)、0.1.5-rc.1、0.1.0-rc.7 全部放行
  • 第 0 节守卫做过反向对照:塞回旧的 <0.2.0-0 会如期报红

安装

dsh plugin --profile web add github:jiangzhenguo/dsh-codegraph