Skip to content

Releases

v0.1.2 — 修复自建后端 PTY 清理失败

Choose a tag to compare

@liu-zhengdong liu-zhengdong released this 13 Oct 00:57

修什么

自建后端(zsh、cmd 等)关闭会话时 terminal_close 报 PTY cleanup failed。

根因

sessionConfig 手工拼装后端配置时漏掉了官方 Config 的 grace 字段,disposeGraceMs / handoffGraceMs / promptTailGraceMs 为 undefined:

  • disposeGraceMs 缺失 → 子进程 graceMs 变 undefined,stopShell 的 Date.now() + graceMs 得 NaN,等待循环一次都不进,SIGTERM/SIGKILL 后直接抛 PTY cleanup failed(实测 zsh 会话必现)。
  • handoffGraceMs 缺失 → 就绪判定 idleSilenceMs + handoffGraceMs 得 NaN,永远不按 inferred_idle 收敛。

怎么修

把拼好的配置过一遍官方 Config 补默认值:官方 Config 是这些字段的唯一权威来源,以后官方加字段也能自动跟上。

怎么验证

同一路径实测:修复前 kill 抛 PTY cleanup failed (model request),修复后正常返回。

v0.1.1 — 修依赖声明,插件不再静默失效

Choose a tag to compare

@liu-zhengdong liu-zhengdong released this 10 Oct 08:51

修依赖声明,插件不再静默失效。

症状

启动时报:

dsh: warning: 2 entries did not activate
(@deepseek-ai/dsh-tool-terminal): failed to import
(dsh-shells): failed to import

整个 bundle 不生效,terminal_* 工具不会注册,侧边栏面板也不出现。

根因

@deepseek-ai/schemastery 被声明成 peerDependency,而 DSH profile 的 pnpm
配置里设了 autoInstallPeers: false——没有任何东西会去装它,插件导入 src/index.js
时第一行就 ERR_MODULE_NOT_FOUND。

这个坑不容易发现,因为在装了很多插件的 profile 里(比如 web),别的插件会把
schemastery 当普通依赖装进来,碰巧满足了它;只有在插件较少的 profile 里
才会暴露。看上去像「玄学时好时坏」。

改动

挪到 dependencies,由 pnpm 负责安装。

验证

从 GitHub 安装后启动,激活警告消失,terminal_open(type=zsh) 实际开出一个
PTY 会话并通过。

安装

dsh plugin --profile <profile> add github:liu-zhengdong/dsh-shells

已知限制

Windows 后端(cmd/gitbash/pwsh)仍未在 Windows 真机上验证,实验性。