dsh-workspace-enhancement
安全与治理 活跃维护

dsh-workspace-enhancement

DobyChao/dsh-workspace-enhancement

工作区增强插件,将本地与SSH远程工作区统一整合,复用单条SSH连接支持多跳跳转,共享Bash终端、文件操作、PTY交互与LSP服务,无需切换环境即可跨端开发。

0
Stars 标星
0
Forks 分支
0
Watchers 关注
0
Open Issues
TypeScript
主要语言
MIT
开源协议
366 KB
仓库大小
26 天前
最后推送
一键安装扩展 / 插件指令
dsh plugin --profile web add github:DobyChao/dsh-workspace-enhancement
git clone https://github.com/DobyChao/dsh-workspace-enhancement.git
git clone git@github.com:DobyChao/dsh-workspace-enhancement.git
README.md main

dsh-workspace-enhancement

English | 中文

npm version license node version dsh-plugin

A DeepSeek Harness workspace-enhancement plugin — local and remote (SSH) workspaces managed in one place. A session can hold multiple workspaces (a main cwd plus side directories), each with its own permissions; machines, TOFU host keys and keychain passwords all live in your local ~/.dsh. Built on ssh2.

Features

Feature Description
Remote workspaces ctx.subprocess + ctx.fs transparent remote providers: one SSH chain (multi-hop) runs bash / files / PTY / directory browsing with no code changes on the tools
Multi-workspace sessions The「⊕ 工作区」button in the session header: attach one or more side workspaces (local dirs or remote machine dirs) to a session, each with its own permission (fs: read-only / read-write + exec: on / off); the model is told about them and can operate them directly
Add-workspace flow Connection sidebar (saved machines, ~/.ssh/config aliases, local) + directory browser (breadcrumbs, native chooser, new folder); remote "Connect & open" creates the session straight on the server
Machine settings page Machine CRUD / test / set-current / forget host key; OS-keychain passwords; TOFU host keys (accept-new default)
Session awareness Remote marker + online tri-state + reconnect in the sidebar; per-session prompt injection states the remote / side-workspace context and its permission marks
Model tools sw_status, sw_connect (save:false = temporary), sw_pick_workspace

How it works

flowchart LR
    subgraph local["Your machine"]
        agent["agent loop<br/>orchestration · memory · LLM calls"] --> seam["this plugin<br/>ctx.subprocess · ctx.fs"]
    end
    subgraph remote["Remote host"]
        run["bash · files · PTY (terminal)"]
    end
    seam -- "one SSH connection (multi-hop jumps)" --> run

No DSH install on the remote: the model orchestrates locally, commands run remotely, results come back into context.

Design notes (implementation facts, not user features):

  • Registry & routing: remote-workspaces/machines.json is the single source of truth; ssh://<id>/<path> (and the local dsw-routes placeholder tree) route every operation to the right machine; ~/.ssh/config aliases are recognized.
  • Security: TOFU host keys (accept-new / verify / off), per-machine OS keychain (DPAPI / security / secret-tool), credentials redacted in error messages.
  • Workspace permissions are enforced at the engine seams (ctx.subprocess / ctx.fs are this plugin's single implementation): a read-only side workspace rejects writes, exec: off rejects launching a process inside that side workspace; command text is not inspected (documented boundary).

Install

# from npm (v0.1.0+)
dsh plugin --profile web add dsh-workspace-enhancement
# from source: npm run build first (host loads lib/)
dsh plugin --profile web add <this-repo-path>

First install with DSH's supply-chain pnpm: native build scripts are blocked by default —
allow them once per profile in pnpm-workspace.yaml (unstrict allowBuilds):
ssh2, cpu-features, koffi, node-pty, dsh-subprocess-local — then run
dsh plugin --profile web install. Without it the first add exits non-zero
(ERR_PNPM_IGNORED_BUILDS) and the bundle is not appended.

Roadmap

Current status and remaining milestones: docs/ROADMAP.md.

References

  • dsh-ssh: remote execution engine — ctx.subprocess / ctx.fs providers, jump chains, PTY, directory-picker seam, session.route placeholder.
  • dsh-remote: workspace helper — machines registry, TOFU, OS keychain, web UI and settings page.

License

MIT