DeepSeek Harness 插件

dsh-web-terminal-helays

DSH bundle 插件:在 DeepSeek Harness Web 界面的「对话 / 轨迹」顶部新增「终端」Tab,内置 xterm.js + node-pty 交互式终端,编码完成后即时在终端执行指令调试。(英文原文)

跳到安装方式

来源信息

GitHub 仓库
helays/dsh-web-terminal
最近更新
2026年8月15日
分类
插件开发工具
GitHub stars
4
载体类型
plugin
目录证据
上游声明已找到 dsh.bundle
证据路径
package.json#dsh.bundle
核对版本
0.1.0-rc.8
上游核对日期
2026-08-20

该证据由上游目录提供。本站没有安装、运行或安全审核这个插件。

安装

默认先复制一段 Prompt,让 Agent 读 GitHub 仓库和源码;需要自己装时再切到命令。

复制这段 Prompt,发给 DSH、Codex 或其他 Agent,让它先读 GitHub 仓库和源码。

请先不要安装或执行任何命令。阅读这个插件的 GitHub 仓库、README 和关键源码,然后用清楚、直接的方式回答以下问题,帮助我判断它是否适合我的需求:

1. 这个插件是什么,解决什么问题;
2. 适合哪些用户和典型使用场景;
3. 安装后如何使用,并给出一个最小使用示例;
4. 有哪些已知限制,以及隐私、安全、兼容性或维护风险;
5. 给出“推荐 / 有条件推荐 / 不推荐”的明确建议和理由。

请区分仓库明确说明、根据源码推断和未知信息。证据不足时请明确说明,不要猜测或照抄 README。

GitHub:https://github.com/helays/dsh-web-terminal
插件名:dsh-web-terminal-helays
作者:helays

检查来源文件

安装前先看这个插件目录里的 README 和其他文件。

文件资源管理器3 个文件
README.md来源说明 · 只读预览

<!-- dsh-web-terminal — English README. Badges are shields.io; dynamic GitHub badges (stars/contributors, …) go live once the repo is public. -->

<div align="center">

🖥️ dsh-web-terminal

Give your AI coding workbench a real terminal — right inside DeepSeek Harness.

An interactive PTY terminal powered by xterm.js + node-pty, mounted as a third tab (Chat · Trajectory · Terminal) at the top of the web UI. After the model writes code, stay in the conversation and open a shell of your own right next to it — build, commit, test, debug in one click.

</div>

<p align="center"> <a href="https://github.com/helays/dsh-web-terminal/blob/main/LICENSE"><img alt="License: MIT" src="https://img.shields.io/badge/License-MIT-yellowgreen.svg?style=flat-square"/></a> <a href="https://github.com/helays/dsh-web-terminal"><img alt="Version" src="https://img.shields.io/badge/version-0.1.0-blue.svg?style=flat-square"/></a> <a href="https://www.deepseek.com/harness"><img alt="DeepSeek Harness" src="https://img.shields.io/badge/platform-DeepSeek%20Harness-4f8cff.svg?style=flat-square"/></a> <a href="https://github.com/helays/dsh-web-terminal"><img alt="dsh-plugin" src="https://img.shields.io/badge/type-dsh--plugin-7c3aed.svg?style=flat-square"/></a> <a href="https://github.com/helays/dsh-web-terminal"><img alt="Stars" src="https://img.shields.io/github/stars/helays/dsh-web-terminal?style=flat-square&logo=github" /></a> <a href="https://github.com/helays/dsh-web-terminal"><img alt="Last commit" src="https://img.shields.io/github/last-commit/helays/dsh-web-terminal?style=flat-square" /></a> </p>

<p align="center"> English · <a href="./README.zh.md">中文</a> </p>

---

Why you'll love it

The pain 😤The fix with dsh-web-terminal ✅
After the model edits code, you copy-paste it back into your own terminal and fumbleOpen a real PTY right next to the chat — type a command, run it instantly
Everything has to squeeze into the conversation context, doubling tokens and noiseThe terminal is fully decoupled from the model / agent — your private shell, zero context cost
Switching sessions or refreshing loses your commands and session stateSurvives across sessions: switch away / come back / refresh — auto reconnect and replay scrollback
Spinning up a throwaway shell for a single command is slowPersistent process: open once, run many commands on one resident shell (Ctrl+C interrupts, then keep going)

> In one line: put “writing code” and “running code” in the same place — without them interfering.

---

✨ Highlights

  • 🗂️ A dedicated Terminal tab next to Chat & Trajectory — one click to switch.
  • 🧯 A real PTY, not a toy:

- Windows uses ConPTY; POSIX uses an interactive shell; - full Ctrl+C / Ctrl+D control keys, resize auto-fit, color + cursor blink; - persistent session (process stays resident, so you can chain commands without restarting).

  • 🔄 Session survival + scrollback replay: tab away and back, even reload the page — it auto-reconnects and replays recent output (the pool lives plugin-side).
  • 🚪 Zero conversation pollution: fully independent of the agent stream — no context tokens, no chat-log noise.
  • Zero config: PowerShell on Windows and bash on POSIX are auto-detected; run multiple terminals side by side and switch each one's shell type (bash / zsh / pwsh / powershell / cmd / python, …) from a dropdown right in the Terminal tab.
  • 🗂️ Multi-terminal: open several terminals in one tab, switch with the tab cards, each with its own process.
  • ⌨️ Type /terminal in the composer to jump straight to the terminal (a single-step command, same source as the official /plan) — works even in an empty new session.
  • 🧩 A pure DSH bundle plugin: install, run, natively integrated with the official UI slots.

---

🚀 Quick Start

> Requires: DeepSeek Harness 0.1.0-rc.6 (next channel) web profile.

Install

# Option 1 — GitHub (recommended, reproducible)
dsh plugin --profile web add dsh-web-terminal@github:helays/dsh-web-terminal#main -w

# Option 2 — from a local dev checkout
cd dsh-web-terminal && dsh plugin --profile web add . -w

> ⚠️ -w is required: the current dsh profile template is a pnpm workspace root > (pnpm-workspace.yaml contains packages: [.]); omitting it triggers ERR_PNPM_ADDING_TO_ROOT. > dsh plugin forwards its remaining args to pnpm verbatim. > > After installing, restart dsh web (a changed plugin set / host needs a restart), then refresh the browser.

Usage

1. Open any session (once you're inside, you'll see Chat · Trajectory · Terminal at the top). 2. Click the Terminal tab, or type /terminal in the input box. 3. Run commands directly, for example:

npm run build   # build right after the model edits code
git status      # see what changed
pytest          # run tests

4. The tab bar shows connection status; switch back to Chat whenever you like — your terminal and session are still there.

---

🧩 Tech Stack

LayerChoiceNotes
Front-end terminal@xterm/xterm + @xterm/addon-fitBundled into the client bundle (lib/client.js), registered via __ModuleLoader__.load
Back-end PTYnode-ptyNative PTY (Windows ConPTY / POSIX pty), resident process
TransportwsWebSocket bidirectional byte stream + resize via ctx.webServer
UI integrationctx.slots.inject('conversation.view')Registers the id:'terminal' tab, mirroring dsh-client-ui-trajectory

Why a “real” terminal — and how it differs from the built-in dsh-terminal

The built-in ctx.terminals is agent-owned, model-facing, line-oriented, with no browser transport and unavailable on Windows. Here we instead spawn a shell that belongs entirely to you via node-pty, fully decoupled from the agent session — it is your own terminal.

---

🔧 Local Development

pnpm install     # install deps (types included)
pnpm build       # outputs lib/index.js + lib/client.js + lib/client.css
pnpm typecheck   # tsc --noEmit type check
  • Changing the host half (src/) requires a dsh web restart;
  • Changing the client half (src/client/) just needs a reinstall + page refresh.

---

❓ FAQ

Q: Does this terminal consume my conversation context? No. It is fully decoupled from the model/agent conversation — nothing is written to context and nothing mixes into the chat log.

Q: Will my session survive a restart/refresh? Yes. The session pool lives plugin-side and survives across sessions and reloads; on reconnect it replays the latest output.

Q: I only want to run a single command — must I open a terminal? Once open the process stays resident, so you can keep operating inside it; switching away and back returns to the same shell.

Q: Can I swap shells? Yes — per terminal. In the Terminal tab, use the “Terminal type” dropdown (top-right) to pick bash / zsh / pwsh / powershell / cmd / python (from the shells detected on your system); switching restarts that terminal with the new shell. It auto-detects PowerShell on Windows and bash on POSIX by default.

Q: Where do terminals open by default? In the current conversation's workspace directory (falling back to the dsh web startup directory if unavailable). No configuration needed.

---

📝 License

[MIT](./LICENSE) © helays