← 返回列表
D

dsh-web-terminal

v0.1.1 · 1 天前发布

Local terminal plugin for the DeepSeek Harness web GUI: a multi-tab xterm.js panel over real node-pty shells, streamed through a WebSocket route on the host process. Hot-pluggable — mounted via the web profile bundle list, no dsh source changes.

deepseek-harnessdshdsh-pluginterminalxtermnode-ptyptyweb-terminal

README

dsh-web-terminal

为 DeepSeek Harness Web GUI 提供的本地终端插件:侧边栏「终端」入口打开多标签 xterm.js 终端面板,每个标签在宿主进程通过 node-pty 起一个真实 PTY shell,输入输出经 /api/dsh-terminal WebSocket 转发。支持交互式程序(vim/top/htop)、Ctrl-C 中断、resize、多标签与断线重连。

完全热插拔:无需修改 dsh 源码,通过 web profile 的 bundle 列表挂载(同 dsh-ssh 的"双面插件"模式)。

架构

| 半 | 入口 | 职责 |
|---|---|---|
| host(node) | lib/index.jssrc/index.ts) | node-pty shell 会话、/api/dsh-terminal/info 路由、/api/dsh-terminal/terminal WebSocket 升级、系统提示词声明、设置命名空间(shell/cwd) |
| client(browser) | lib/client.jssrc/client/index.ts) | 侧边栏「终端」入口(DOM 注入、自愈式)、多标签终端面板(React + xterm.js) |

协议(src/protocol.ts):

  • client → host:{type:"input",data}{type:"resize",cols,rows}

  • host → client:{type:"ready",shell}、`{type:
  • 查看完整 README →

    版本兼容矩阵

    DSH 版本状态说明
    dsh@0.1.0-rc.6 ✅ 兼容 cordis patch ✅
    dsh@0.1.0 ✅ 兼容 标准 patch ✅
    dsh@0.2.0 ⚠️ 待验证 待实测(API 可能在变)
    dsh@0.3.0+ ❓ 未知 尚未发布

    💡 兼容矩阵每周末自动跑实测,欢迎 PR 修正

    元数据

    License
    MIT
    npm
    dsh-web-terminal
    Repo
    git+https://github.com/iamsee123/dsh-web-terminal.git
    Engines
    {"node":"^22.19.0 || >=24.0.0"}
    Weekly DL
    0
    Monthly DL
    0
    dsh.bundle
    {"bundle":{"patch":"./cordis.patch.yml"},"client":{"inject":[],"platform":"web"}}