dsh-ssh-workspace-companion 0.2.0 → 0.2.3

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.
Files changed (2) hide show
  1. package/README.md +81 -10
  2. package/package.json +7 -5
package/README.md CHANGED
@@ -1,26 +1,97 @@
1
1
  # dsh-ssh-workspace-companion
2
2
 
3
- Remote companion plugin for `dsh-ssh-workspace`.
3
+ [English](#english) · [简体中文](#简体中文)
4
4
 
5
- Install it in each remote DSH web profile that should be embedded by the local Remote Desktop controller. It exposes only a transitional local health endpoint, runs only in `?dshRemoteDesktop=1` iframe mode, validates parent origin/token messages, forwards official Client Controller state and commands over a versioned `MessageChannel`, opens requested remote sessions, and hides the embedded remote left sidebar.
5
+ ## English
6
6
 
7
- The companion does not expose Session/Workspace snapshot or RPC Host APIs. The authenticated remote DSH Gateway and its official `ctx.sessions` / `ctx.workspaces` services remain the only business-data path.
7
+ The remote companion for [dsh-ssh-workspace](https://www.npmjs.com/package/dsh-ssh-workspace). Install it in each remote DeepSeek Harness (DSH) Web profile so the local plugin can open and operate that machine's workspaces and sessions.
8
8
 
9
- ## Install
9
+ ### Where to install
10
+
11
+ - Install `dsh-ssh-workspace` on the local machine.
12
+ - Install this package, `dsh-ssh-workspace-companion`, on every remote machine.
13
+
14
+ Use this package together with the local plugin.
15
+
16
+ ### Compatibility
17
+
18
+ Plugin 0.2.x targets **DSH 0.2.0-rc.2** and does not support DSH 0.1.x. Keep the local plugin and all remote companions on the same version and restart DSH after updating.
19
+
20
+ ### Remote installation
21
+
22
+ ```sh
23
+ dsh plugin --profile web add dsh-ssh-workspace-companion
24
+ ```
25
+
26
+ Bind the remote Web service to loopback:
27
+
28
+ ```sh
29
+ dsh --profile web --host 127.0.0.1 --port 30800 --trusted-host 127.0.0.1:30800
30
+ ```
31
+
32
+ The local plugin connects through an SSH tunnel. If you use a custom `DSH_HOME`, installation, startup and the remote profile path in local Remote Desktop settings must refer to the same directory.
33
+
34
+ Install the main plugin on the local machine, then connect the SSH host in **Settings → Remote Desktop**:
35
+
36
+ ```sh
37
+ dsh plugin --profile web add dsh-ssh-workspace
38
+ ```
39
+
40
+ ### How it works
41
+
42
+ The companion validates the parent origin and connection token inside the remote iframe opened by the local plugin. It forwards official DSH Controller state and actions through a dedicated MessageChannel and hides the embedded remote sidebar. Remote business data continues to use the remote DSH authenticated services.
43
+
44
+ ### Documentation and development
45
+
46
+ - [Project and full instructions](https://github.com/sincerity711/dsh-ssh-workspace)
47
+ - [Remote server setup](https://github.com/sincerity711/dsh-ssh-workspace/blob/main/docs/remote-server-setup.md)
48
+ - [Report an issue](https://github.com/sincerity711/dsh-ssh-workspace/issues)
49
+
50
+ Edit `packages/companion/src/client.js`, then run `npm run build` and `npm run check` from the repository root.
51
+
52
+ ## 简体中文
53
+
54
+ [dsh-ssh-workspace](https://www.npmjs.com/package/dsh-ssh-workspace) 的远程配套插件。安装在每台远程机器的 DeepSeek Harness(DSH)Web profile 中,让本地插件可以打开和操作该机器的工作区与会话。
55
+
56
+ ## 安装位置
57
+
58
+ - 本地机器安装 `dsh-ssh-workspace`。
59
+ - 每台远程机器安装本包 `dsh-ssh-workspace-companion`。
60
+
61
+ 本包需要配合本地插件使用。
62
+
63
+ ## 兼容性
64
+
65
+ 插件 0.2.x 面向 **DSH 0.2.0-rc.2**,不支持 DSH 0.1.x。本地插件与所有远程 companion 应使用相同版本,更新后重启 DSH。
66
+
67
+ ## 远程机器安装
10
68
 
11
69
  ```sh
12
70
  dsh plugin --profile web add dsh-ssh-workspace-companion
13
71
  ```
14
72
 
15
- Before npm publication, install from a local checkout on the remote machine/profile:
73
+ 远程 Web 服务应绑定 loopback:
16
74
 
17
75
  ```sh
18
- dsh plugin --profile web add /path/to/dsh-remote-desktop/packages/companion
76
+ dsh --profile web --host 127.0.0.1 --port 30800 --trusted-host 127.0.0.1:30800
19
77
  ```
20
78
 
21
- The iframe client source is `src/client.js`; `lib/client.js` is generated with
22
- the repository-level `npm run build` command.
79
+ 本地插件通过 SSH 隧道连接该服务。如果使用自定义 `DSH_HOME`,安装、启动和本地 Remote Desktop 设置中的远程 profile 路径必须对应同一个目录。
80
+
81
+ 随后在本地机器安装主插件,并在 **Settings → Remote Desktop** 中连接 SSH 主机:
82
+
83
+ ```sh
84
+ dsh plugin --profile web add dsh-ssh-workspace
85
+ ```
86
+
87
+ ## 工作方式
88
+
89
+ companion 在本地插件打开的远程 iframe 中验证父页面来源和连接 token,通过专用 MessageChannel 转发 DSH 官方 Controller 状态与操作,并隐藏 iframe 中的远程侧栏。远程业务数据继续由远程 DSH 的认证服务处理。
90
+
91
+ ## 文档与反馈
23
92
 
24
- ## Architecture
93
+ - [项目与完整使用说明](https://github.com/sincerity711/dsh-ssh-workspace)
94
+ - [远程服务器配置](https://github.com/sincerity711/dsh-ssh-workspace/blob/main/docs/remote-server-setup.md)
95
+ - [问题反馈](https://github.com/sincerity711/dsh-ssh-workspace/issues)
25
96
 
26
- See the repository [architecture reference](https://github.com/sincerity711/dsh-remote-desktop/blob/main/docs/architecture.md) for iframe bridge, token validation, and companion behavior.
97
+ 开发时修改 `packages/companion/src/client.js`,再在仓库根目录执行 `npm run build` 和 `npm run check`。
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "dsh-ssh-workspace-companion",
3
- "version": "0.2.0",
3
+ "version": "0.2.3",
4
4
  "description": "Remote companion for dsh-remote-desktop iframe control.",
5
5
  "type": "module",
6
6
  "main": "lib/index.js",
@@ -45,17 +45,19 @@
45
45
  "remote-desktop",
46
46
  "iframe",
47
47
  "companion",
48
- "remote-workspace"
48
+ "remote-workspace",
49
+ "ssh-workspace",
50
+ "dsh-ssh-workspace"
49
51
  ],
50
52
  "repository": {
51
53
  "type": "git",
52
- "url": "git+https://github.com/sincerity711/dsh-remote-desktop.git",
54
+ "url": "git+https://github.com/sincerity711/dsh-ssh-workspace.git",
53
55
  "directory": "packages/companion"
54
56
  },
55
57
  "bugs": {
56
- "url": "https://github.com/sincerity711/dsh-remote-desktop/issues"
58
+ "url": "https://github.com/sincerity711/dsh-ssh-workspace/issues"
57
59
  },
58
- "homepage": "https://github.com/sincerity711/dsh-remote-desktop#readme",
60
+ "homepage": "https://github.com/sincerity711/dsh-ssh-workspace#readme",
59
61
  "publishConfig": {
60
62
  "access": "public",
61
63
  "registry": "https://registry.npmjs.org/"