@lengmoxxl/dsh-remote-workspace 0.1.11

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 lengmoXXL
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
package/README.md ADDED
@@ -0,0 +1,85 @@
1
+ # dsh-remote-workspace
2
+
3
+ A DSH plugin for working on another machine. It manages that machine's repositories and worktrees, routes the
4
+ harness's file, shell, and terminal tools to the directory you opened, and adds terminal tabs to the right Sidebar.
5
+ The model sees ordinary local paths.
6
+
7
+ English | [中文](README.zh.md)
8
+
9
+ ![A session running tools inside a remote worktree](docs/screenshots/en/08-session.png)
10
+
11
+ | Machines | Connected | A worktree |
12
+ | --- | --- | --- |
13
+ | ![The machine list](docs/screenshots/en/01-section.png) | ![A connected machine and its repository](docs/screenshots/en/03-connected.png) | ![A created worktree](docs/screenshots/en/06-worktree-created.png) |
14
+
15
+ ## Requirements
16
+
17
+ - Node 22.19+ or 24+, with `ssh` configured as usual.
18
+ - DSH `0.1.5-rc.2`. Other releases are untested.
19
+
20
+ ## Install
21
+
22
+ ```sh
23
+ dsh plugin --profile web add @lengmoxxl/dsh-remote-workspace
24
+ ```
25
+
26
+ The plugin takes over services the base profile provides, and the host plane holds one implementation per service. Add
27
+ these four lines to `$DSH_HOME/profiles/web/cordis.patch.yml`. Without them the plugin still loads, does not route, and
28
+ says so on stderr.
29
+
30
+ ```yaml
31
+ - id: subprocess
32
+ disabled: true
33
+ - id: fs-sandbox
34
+ disabled: true
35
+ - id: bash-sandbox
36
+ disabled: true
37
+ - id: pwsh-sandbox
38
+ disabled: true
39
+ ```
40
+
41
+ Then start the profile with `dsh --profile web`. The package ships the built `lib/`, so nothing is compiled on this
42
+ machine. To work on the plugin itself, clone the repository, run `npm install && npm run build`, and add the checkout
43
+ path instead.
44
+
45
+ ## What it does
46
+
47
+ - Adds machines over SSH, and a built-in `Local` machine for this host. The agent is downloaded from this repository's
48
+ Releases, checked against `SHA256SUMS`, and reached over `ssh -L`, so nothing has to be installed on the machines.
49
+ - Registers any directory as a repository. Git is not required, and a plain directory can become a repository later.
50
+ - Cuts worktrees from a repository, adopts worktrees that already exist, or opens the repository directory itself.
51
+ Removing a worktree can delete its branch as well.
52
+ - Opens a directory as a workspace; the file, shell, and terminal tools then run on the machine that owns it.
53
+ - Opens terminal tabs in the right Sidebar, one per Session. The **Terminal** entry first lists that Session's live
54
+ shells — including one a page reload or a closed tab detached — so one can be reattached or ended.
55
+ - Lets the agent work in a terminal that has a tab open. It lists them, reads output, writes text and keys (including
56
+ `ctrl+c`), and waits for output to appear. It does not create or close terminals.
57
+
58
+ ## Usage
59
+
60
+ **Settings → Remote workspaces.** Add a machine with an SSH destination and a token — any string; it is the daemon's
61
+ shared secret. `Local` needs neither. Machines connect on their own, and one that stays unreachable shows a **Connect**
62
+ button. Register a repository, then use a row's menu to open, close, or remove what it holds.
63
+
64
+ **Terminal.** The right Sidebar's add control has a **Terminal** button: it lists the Session's live terminals and
65
+ offers a new one. **Manage terminals** in the panel's status bar opens a second terminal tab beside the one in view, where
66
+ the chooser offers a fresh shell or one that is already running; a shell another tab already shows is marked
67
+ **Already open**, and picking it brings that tab forward. Closing a tab leaves that shell running — it shows up in the
68
+ chooser as detached — and a row's close control in the chooser, which the panel's **Manage terminals** control opens, is what ends it.
69
+ Hiding the tab, switching Session, or collapsing the sidebar also leaves a shell running.
70
+
71
+ **Terminal appearance.** Font, size, line height, scrollback, and cursor blink live in the shell's own settings:
72
+ **Settings → Plugins → Plugin configuration → Terminal appearance**. They are stored in the settings document, so every
73
+ page of this deployment draws a terminal the same way.
74
+
75
+ ## Config
76
+
77
+ | Field | Default | Meaning |
78
+ |---|---|---|
79
+ | `worktreeRoot` | `~/.dsh/worktrees` | Root every managed checkout is cut under, on every machine. |
80
+ | `shell` | unset | Program the Sidebar terminal runs; unset uses the machine's own login shell. |
81
+ | `shellArgs` | `['-l']` | Arguments after `shell`; ignored while `shell` is unset. |
82
+ | `graceMs` | `3000` | How long a closing terminal is given to exit, in milliseconds. |
83
+ | `detachGraceMs` | `0` | Safety valve: how long a terminal whose socket went away (a reload, a dropped connection) is kept for a reattach, in milliseconds. `0` — the default — keeps it for as long as its process lives. |
84
+
85
+ MIT
package/README.zh.md ADDED
@@ -0,0 +1,78 @@
1
+ # dsh-remote-workspace
2
+
3
+ 一个在另一台机器上工作的 DSH 插件。它管理那台机器的仓库和 worktree,把 harness 的文件、shell 和终端工具路由到你
4
+ 打开的目录,并在右侧边栏加上终端标签页。模型看到的是普通本地路径。
5
+
6
+ [English](README.md) | 中文
7
+
8
+ ![在远端 worktree 里执行工具的会话](docs/screenshots/zh/08-session.png)
9
+
10
+ | 机器列表 | 已连接 | 切出的 worktree |
11
+ | --- | --- | --- |
12
+ | ![机器列表](docs/screenshots/zh/01-section.png) | ![已连接的机器与仓库](docs/screenshots/zh/03-connected.png) | ![已创建的 worktree](docs/screenshots/zh/06-worktree-created.png) |
13
+
14
+ ## 环境要求
15
+
16
+ - Node 22.19+ 或 24+,以及按平时方式配好的 `ssh`。
17
+ - DSH `0.1.5-rc.2`。其他版本未测试。
18
+
19
+ ## 安装
20
+
21
+ ```sh
22
+ dsh plugin --profile web add @lengmoxxl/dsh-remote-workspace
23
+ ```
24
+
25
+ 插件要接管 base profile 提供的服务,而 host plane 每项服务只允许一个实现。把这四行加进
26
+ `$DSH_HOME/profiles/web/cordis.patch.yml`;缺了它们插件仍会加载、但不会路由,并在 stderr 上说明。
27
+
28
+ ```yaml
29
+ - id: subprocess
30
+ disabled: true
31
+ - id: fs-sandbox
32
+ disabled: true
33
+ - id: bash-sandbox
34
+ disabled: true
35
+ - id: pwsh-sandbox
36
+ disabled: true
37
+ ```
38
+
39
+ 然后用 `dsh --profile web` 启动。包里带着构建好的 `lib/`,本机不编译任何东西。改插件本身时,改为 clone
40
+ 仓库、`npm install && npm run build`,再添加检出目录。
41
+
42
+ ## 功能
43
+
44
+ - 通过 SSH 添加机器,以及一个操作本机的内置 `Local` 机器。agent 从本仓库 Releases 下载、用 `SHA256SUMS` 校验、
45
+ 经 `ssh -L` 到达,所以机器上不需要安装任何东西。
46
+ - 把任意目录登记为仓库;不要求是 git 仓库,普通目录之后也可以变成仓库。
47
+ - 从仓库切 worktree、纳入已存在的 worktree、或直接打开仓库目录;删除 worktree 时可以选择连分支一起删。
48
+ - 把目录打开为工作区后,文件、shell 和终端工具都跑在拥有它的那台机器上。
49
+ - 在右侧边栏开终端标签页,每个会话一个。**终端**按钮会先列出该会话中仍在运行的终端(包括刷新页面或关闭标签后脱离
50
+ 的那个),可以重新接入,也可以结束。
51
+ - agent 可以在**开着标签的**终端里干活:列出终端、读输出、输入文本和按键(包括 `ctrl+c`)、等待输出出现。它不会
52
+ 创建或关闭终端。
53
+
54
+ ## 使用
55
+
56
+ **设置 → 远程工作区。** 用 SSH 目标和 token(任意字符串,是 daemon 的共享密钥)添加机器;`Local` 两项都不需要。
57
+ 机器会自动连接,一直连不上的显示**连接**按钮。登记仓库后,用每行的菜单打开、关闭或移除它持有的东西。
58
+
59
+ **终端。** 右侧边栏的添加控件里有一个**终端**按钮:它会列出该会话在运行的终端,也可以新建一个。面板状态栏里的
60
+ **管理终端**会在当前标签旁再开一个终端标签页,由列表让你接入已有 shell 或新建一个;已被其他标签打开的终端标为
61
+ **已打开**,选中它会切到那个标签。关闭标签只是让它脱离:
62
+ shell 会继续在主机上运行,并在列表里显示为已断开;要结束它,用列表里每行的关闭按钮。隐藏标签、
63
+ 切换会话、收起边栏同样不会中断它。
64
+
65
+ **终端外观。** 字体、字号、行高、回滚行数和光标闪烁在 shell 自己的设置里:**设置 → 插件 → 插件配置 → 终端外观**。
66
+ 它们存在设置文档里,所以这个部署的每个页面画出来的终端都一样。
67
+
68
+ ## 配置
69
+
70
+ | 字段 | 默认值 | 含义 |
71
+ |---|---|---|
72
+ | `worktreeRoot` | `~/.dsh/worktrees` | 每台机器上切出的检出所在的根目录。 |
73
+ | `shell` | 未设置 | 侧边栏终端运行的程序;未设置则用机器自己的登录 shell。 |
74
+ | `shellArgs` | `['-l']` | `shell` 之后的参数;`shell` 未设置时忽略。 |
75
+ | `graceMs` | `3000` | 关闭终端时留给它退出的时间(毫秒)。 |
76
+ | `detachGraceMs` | `0` | 安全阀:终端 socket 断开(刷新页面、连接掉线)后保留多久等待重新接入(毫秒)。`0`(默认)表示只要进程还在就一直保留。 |
77
+
78
+ MIT
@@ -0,0 +1,10 @@
1
+ # dsh-remote-workspace bundle patch: one insert, nothing else.
2
+ #
3
+ # The stock rows this plugin routes are disabled by the deployment's own patch
4
+ # layer (the README lists the four lines): a submitted bundle must not take over
5
+ # components it does not own — DSH-Store rule 7, and the entry ids already
6
+ # belong to other submissions.
7
+
8
+ - insert:
9
+ - id: dsh-remote-workspace
10
+ name: "@lengmoxxl/dsh-remote-workspace"