chenw2759-wq/dsh-IDE--packages-dsh-easyssh ↗★ 3
dsh-easyssh
SSH remote workspace for the dsh web GUI: enter SSH mode from the session header (left of session log), browse/edit remote files in a new left panel, and let the local harness operate the remote server through remote_* agent tools. Reuses the dsh-ssh engine, host store, and loopback trust fence.
安装
$
npx -p @deepseek-ai/dsh dsh plugin --profile web add github:chenw2759-wq/dsh-IDE#09069d2edd4886b532cc7a118d0fc6db032eb78a&path:packages/dsh-easyssh说明文档
阅读完整 README ↗dsh-ssh-workspace — SSH 远程工作区插件
在 DSH Web GUI 中一键进入「SSH 模式」:右上角(session log 左侧)配置 SSH 主机
(密码 / 密钥,复用 dsh-ssh 的 ~/.dsh/dsh-ssh.json),确认后左侧出现远程文件树
面板;本地 harness 通过 SSH/SFTP 操作远程服务器(LLM 与 Agent 循环仍在本机),
右上角切换按钮随时切回本机 UI。
双轨架构(v2 接缝级)
SSH 模式下的远程执行走两条轨:
- 接缝切换(v2,默认路径):profile 补丁(
profiles/web/cordis.patch.yml) 禁用部署自带的fs-sandbox/subprocess行,由本插件提供模式路由门面 (@deepseek-ai/dsh-ssh-workspace/fs、/subprocess)。本地模式门面委托给 同样的沙箱化本地实现(SandboxedFileSystem/LocalSubprocessRuntime, 挂在隔离子作用域);SSH 模式委托给移植自 UynajGI/dsh-ssh (MIT)的远程实现。效果:模型本机的 read/write/edit/glob/grep 与 bash/终端 在 SSH 模式下透明地在远程主机执行,无需提示词约定。 - 显式工具(v1,保留):
remote_status/remote_ls/remote_read/remote_write/remote_mkdir/remote_rm/remote_rename/remote_glob/remote_grep与ssh_exec/ssh_upload/ssh_download仍可用作显式操作与一次性运维。
路径语义(SSH 模式):远程绝对路径直接用;相对路径以远程根目录
remoteRoot(默认 ~,可在左侧面板头部切换)为基准;不要使用 Windows 本机路径。
能力
| 能力 | 说明 |
|---|---|
| 右上角按钮 | conversation.session.header.utilities 槽位(order -10 / -9,位于 session log 左侧) |
| 配置对话框 | 别名 / 主机 / 端口 / 用户名 / 密码或密钥(含 passphrase)/ 远程根(默认 ~);保存进 dsh-ssh 共享主机配置并测试连接 |
| SSH 模式 | 模式状态机 local ⇄ remote@alias(宿主进程单例);远程根经连接解析为绝对路径并作为路径 gate 前缀 |
| 左侧文件树面板 | 在 [data-dsh-frame] grid 前插一列(与 aionui 右侧面板协同,互不覆盖);懒加载树 / 文件名搜索(跳过 .git、node_modules)/ 文本预览与编辑 / 保存带 mtime 冲突检测 / 宽度与折叠按项目持久化 |
| 接缝切换 | ctx.fs / ctx.subprocess 模式路由门面(本地 = 沙箱化原实现;远程 = SFTP/SSH 实现,含原子写、版本、CRLF、流式输出、PTY 终端) |