rea
morluto
Reverse engineer anything with agents, from app behavior down to native binaries.
PROJECT TOPICS
INSTALL REFERENCE
dsh plugin --profile web add github:cyberElar/dsh-fast-term
该命令指向仓库当前默认分支;尚无绑定当前 commit 的完整验证结果。
PROJECT README
DSH(DeepSeek Harness)右侧边栏的终端插件。PTY 输出走专用 WebSocket,不经过共享网关与帧确认,可作为自带终端的替代品。


Ctrl + ` 新建Ctrl 组合优先发给终端dsh_fast_term_read 工具Windows、隔离 profile 实测:
| 场景 | 自带终端 | dsh-fast-term |
|---|---|---|
| 冷启动到提示符(复用已存在 PTY) | 3.1–3.2 s | ~0.12 s |
| 空闲按键回显 | 11.7–12.9 ms | 9.9–14.7 ms |
| 主线程 75% 合成负载下 | 43–46 ms | 4.8–35.7 ms |
| 2.99 MB 输出洪水 | 12.8 s | 2.9 s |
要求 DSH 0.2.1-rc.2+(桌面版或 Web)。
dsh plugin --profile desktop add dsh-fast-term
也可以在「设置 → 插件市场」中搜索 dsh-fast-term。本地开发时安装目录:
dsh plugin --profile desktop add "file:<path>"
安装或更新后需要重启 DSH 宿主。file: 依赖是拷贝而非软链,修改 lib/ 后需重新执行 add,或手动覆盖 profile 下的 node_modules/dsh-fast-term/lib/。
Ctrl + `新终端会从注册表重读系统 Path,安装新的命令行工具后无需重启 DSH。
| 操作 | 快捷键 |
|---|---|
| 新建终端 | Ctrl + ` |
| 复制选中 | Ctrl+C / Ctrl+Shift+C |
| 粘贴 | Ctrl+V |
| 原生粘贴 | Ctrl+Shift+V |
| 发送 SIGINT | Ctrl+C(无选中时) |
| 复制 / 粘贴 / 全选 | 右键菜单 |
桌面版 Windows/macOS:终端获得焦点时,单 Ctrl 组合键(如 tmux 的 Ctrl+B)会直接发送给终端;点击页面其它区域后恢复 DSH 快捷键。
在 profile 的补丁层(如 ~/.dsh/profiles/desktop/cordis.patch.yml)关闭自带终端 UI:
- id: ui-sidebar-terminal
name: "@deepseek-ai/dsh-client-ui-sidebar-terminal"
disabled: true
重启后「新建终端」入口与终端 UI 由本插件接管。终端服务本身仍在,其它插件的终端不受影响;删除该条目即可恢复并存。
默认使用 PowerShell(pwsh → Windows PowerShell → ComSpec 依次回退),可在新建时通过下拉菜单选择其它 shell,或用环境变量 DSH_FAST_TERM_SHELL 覆盖。
默认只读:只有终端界面自身可以输入。点击「只读」胶囊解锁后,其它 WebSocket 客户端(含 Agent)才能写入;配置命令白名单后,按整行前缀匹配(大小写不敏感),白名单之外的行会被丢弃。
配置保存在 ~/.dsh/fast-term.json,也可通过下方接口读写。
宿主提供以下接口,仅接受回环地址并校验 Origin:
| 接口 | 说明 |
|---|---|
GET /api/dsh-fast-term/list |
终端列表:id / title / shell / pid / exited |
GET /api/dsh-fast-term/buffer?id=<id>&tail=8000&plain=1 |
输出缓冲尾部;plain=0 返回带 ANSI 转义的原始流 |
GET /api/dsh-fast-term/screen?id=<id>&cols=120&rows=40 |
重放一帧可见画面,返回按行文本,适合全屏 TUI |
GET /api/dsh-fast-term/config |
读取输入权限配置 |
POST /api/dsh-fast-term/config |
修改输入权限配置 |
curl "http://127.0.0.1:PORT/api/dsh-fast-term/list"
curl "http://127.0.0.1:PORT/api/dsh-fast-term/screen?id=<id>&cols=120&rows=40"
buffer 不做光标重绘还原,逐键重绘的程序可能留下重复片段;需要查看全屏 TUI 时用 screen。缓冲超过 4 MiB 后最旧输出会被丢弃,响应中的 truncated 会标记。
宿主注册 dsh_fast_term_read,Agent 在任意沙箱权限档下都可以读取边栏终端:
| 参数 | 说明 |
|---|---|
list |
只列出终端 |
id |
终端 id,省略时取最近打开的一个 |
tail |
返回末尾字符数,默认 8000(200–200000) |
screen |
按 120×40 屏幕行渲染 |
工具只读,不会写入 PTY。需要 Agent 输入时,先在界面中解锁「可输入」。
127.0.0.1 / ::1 / ::ffff:127.0.0.1),并校验 Origin__DSH_TRANSPORT__.streamBaseUrl 解析宿主地址,只连接回环sidebarRightTabs 与右侧栏标签槽位$SHELL -lCtrl+Shift+VCtrl 组合ui-sidebar-terminal bundle id,DSH 升级改名后补丁会失效npm install
node build.mjs
node --check lib/index.js
dsh plugin --profile web add "file:<path>"
发布由 GitHub Actions 在 GitHub Release 发布时通过 OIDC trusted publishing 完成。
dsh-fast-term is a terminal plugin for DSH's right sidebar. It streams a real PTY over a dedicated WebSocket instead of the shared gateway multiplexer, and can replace the built-in terminal.
It supports persistent sessions, per-tab PTYs with a shell picker, theme and zh/en localization, copy/paste with a context menu, and focus-based shortcut passthrough on Desktop (plain Ctrl combos reach the terminal while it is focused). Read-only HTTP endpoints and the dsh_fast_term_read agent tool expose terminal state to scripts and agents.
dsh plugin --profile desktop add dsh-fast-term
MIT
CLASSIFICATION EVIDENCE
系统优先读取 GitHub Topics,再与站内分类词典和词根规则比对。当前命中: deepseek-harness。