ds-harness-remote 0.3.8 → 0.3.13
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/README.md +63 -67
- package/dist/index.js +1 -1
- package/dist/index.js.map +1 -1
- package/dist/version.d.ts +1 -1
- package/dist/version.d.ts.map +1 -1
- package/dist/version.js +1 -1
- package/dist/version.js.map +1 -1
- package/package.json +20 -12
- package/dist/adapters/agent-adapter.d.ts +0 -35
- package/dist/adapters/agent-adapter.d.ts.map +0 -1
- package/dist/adapters/agent-adapter.js +0 -80
- package/dist/adapters/agent-adapter.js.map +0 -1
- package/dist/adapters/permission-adapter.d.ts +0 -13
- package/dist/adapters/permission-adapter.d.ts.map +0 -1
- package/dist/adapters/permission-adapter.js +0 -67
- package/dist/adapters/permission-adapter.js.map +0 -1
- package/dist/adapters/session-adapter.d.ts +0 -38
- package/dist/adapters/session-adapter.d.ts.map +0 -1
- package/dist/adapters/session-adapter.js +0 -230
- package/dist/adapters/session-adapter.js.map +0 -1
- package/dist/adapters/workspace-adapter.d.ts +0 -13
- package/dist/adapters/workspace-adapter.d.ts.map +0 -1
- package/dist/adapters/workspace-adapter.js +0 -21
- package/dist/adapters/workspace-adapter.js.map +0 -1
- package/dist/event-sequencer.d.ts +0 -23
- package/dist/event-sequencer.d.ts.map +0 -1
- package/dist/event-sequencer.js +0 -54
- package/dist/event-sequencer.js.map +0 -1
- package/dist/pairing-controller.d.ts +0 -52
- package/dist/pairing-controller.d.ts.map +0 -1
- package/dist/pairing-controller.js +0 -73
- package/dist/pairing-controller.js.map +0 -1
- package/dist/pending-approvals.d.ts +0 -14
- package/dist/pending-approvals.d.ts.map +0 -1
- package/dist/pending-approvals.js +0 -52
- package/dist/pending-approvals.js.map +0 -1
package/README.md
CHANGED
|
@@ -1,103 +1,99 @@
|
|
|
1
1
|
# ds-harness-remote
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
English | 中文
|
|
4
4
|
|
|
5
|
-
|
|
6
|
-
- Remote workspace:在当前 Harness UI 中选择另一台 Host 及其工作区。
|
|
5
|
+
## Overview / 概览
|
|
7
6
|
|
|
8
|
-
|
|
7
|
+
DeepSeek Remote plugin for DSH Host + Remote workspaces. One install provides encrypted remote access from your own devices and remote workspace switching inside the existing Harness UI.
|
|
9
8
|
|
|
10
|
-
|
|
9
|
+
DeepSeek Remote 是 DSH Host + Remote 工作区插件。一次安装可提供本地设备到远端的加密远程访问能力,以及在现有 Harness UI 内切换远端工作区。
|
|
11
10
|
|
|
12
|
-
|
|
13
|
-
2. 从侧边栏 **Remote** 打开模态框。
|
|
14
|
-
3. 选择同账号的在线 Host。当前 Host 会被排除;列表显示 macOS、Windows 或 Linux,以及 Harness 和插件版本。
|
|
15
|
-
4. 选择已有 Workspace,或点击 **+** 浏览远端目录并创建 Workspace。
|
|
16
|
-
5. 进入远程工作区后,通过顶部 Header 查看主机、LAN/P2P/TURN/Relay 路径和端到端加密状态;点击 **退出** 回到本地。
|
|
11
|
+
No Client mode switch is required. Choosing a remote workspace keeps the local UI unchanged, routes requests through `RemoteHarnessApiProxy`, and falls back to local ApiProxy on disconnect or exit.
|
|
17
12
|
|
|
18
|
-
|
|
13
|
+
无需启动或切换 Client 模式。选择远端工作区后,本地 UI 不变,请求通过 `RemoteHarnessApiProxy` 路由,断线或退出时恢复本地 ApiProxy。
|
|
19
14
|
|
|
20
|
-
|
|
15
|
+
## User flow / 用户流程
|
|
21
16
|
|
|
22
|
-
|
|
17
|
+
1. Open **Remote** from the sidebar and log in first (preferred entry).
|
|
18
|
+
2. After login, you can enable remote control for the current device.
|
|
19
|
+
3. Select an online Host, then enter an existing workspace or create/browse one remotely.
|
|
20
|
+
4. Use **Exit** to return local and stop forwarding.
|
|
23
21
|
|
|
24
|
-
|
|
22
|
+
1. 从侧边栏优先打开 **Remote** 入口并登录。
|
|
23
|
+
2. 登录后可开启当前设备的远程控制。
|
|
24
|
+
3. 选择同账号在线 Host 后,进入已有 Workspace,或浏览远端目录创建/选择 Workspace。
|
|
25
|
+
4. 使用 **退出** 回到本地并停止转发。
|
|
26
|
+
|
|
27
|
+
## Directory browsing / 目录浏览
|
|
28
|
+
|
|
29
|
+
- Calls remote `host.listDirectory` first.
|
|
30
|
+
- Returns read-only metadata only: one-level children, absolute path, breadcrumbs, Home, hidden flag.
|
|
31
|
+
- No file contents, no file writes, no directory create/rename/delete.
|
|
32
|
+
|
|
33
|
+
- 默认先调用远端 `host.listDirectory`。
|
|
34
|
+
- 仅返回只读元数据:单层子目录、绝对路径、面包屑、Home、隐藏标记。
|
|
35
|
+
- 不读文件内容,不改文件系统,不建/改/删目录。
|
|
36
|
+
|
|
37
|
+
## Architecture / 架构
|
|
25
38
|
|
|
26
39
|
```text
|
|
27
|
-
|
|
40
|
+
Local Harness UI
|
|
28
41
|
-> ApiProxySwitch
|
|
29
42
|
-> RemoteHarnessApiProxy
|
|
30
43
|
-> Adaptive transport (LAN / P2P / TURN / Relay)
|
|
31
44
|
-> Noise IK secure channel
|
|
32
45
|
-> HarnessApiBridge allowlist
|
|
46
|
+
-> Remote Harness ApiProxy
|
|
47
|
+
```
|
|
48
|
+
|
|
49
|
+
```text
|
|
50
|
+
本地 Harness UI
|
|
51
|
+
-> ApiProxySwitch
|
|
52
|
+
-> RemoteHarnessApiProxy
|
|
53
|
+
-> 自适应传输(LAN / P2P / TURN / Relay)
|
|
54
|
+
-> Noise IK 安全通道
|
|
55
|
+
-> HarnessApiBridge allowlist
|
|
33
56
|
-> 远端 Harness ApiProxy
|
|
34
57
|
```
|
|
35
58
|
|
|
36
|
-
|
|
59
|
+
## Key modules / 核心模块
|
|
60
|
+
|
|
61
|
+
- `service.ts`: Host lifecycle / Host 生命周期
|
|
62
|
+
- `client-runtime.ts`: device list, connection, workspace actions / 设备列表、连接、工作区操作
|
|
63
|
+
- `client.ts`: settings UI, remote modal, sidebar, remote header / 设置卡片、Remote 弹窗、侧边栏、远端 Header
|
|
64
|
+
- `harness-api-bridge.ts`: ApiProxy allowlist and stream bridge / ApiProxy 白名单与 stream 桥接
|
|
65
|
+
- `identity-store.ts` / `server-credentials.ts`: account-scoped identity and credentials / 账号隔离的身份与凭证
|
|
37
66
|
|
|
38
|
-
|
|
39
|
-
- `client-runtime.ts`:设备列表、连接、远程目录和 Workspace 操作。
|
|
40
|
-
- `client.ts`:设置卡片、Remote 模态框、侧边栏入口和远程 Header。
|
|
41
|
-
- `harness-api-bridge.ts`:固定 ApiProxy allowlist、unary、respond 与 stream bridge。
|
|
42
|
-
- `remote-directory-browser.ts`:native picker 场景下的只读目录兜底。
|
|
43
|
-
- `server-api.ts` / `server-connection.ts`:账号设备 API 与 Host 控制连接。
|
|
44
|
-
- `identity-store.ts` / `server-credentials.ts`:按 Server origin 和角色隔离的身份与凭证。
|
|
67
|
+
## Security model / 安全模型
|
|
45
68
|
|
|
46
|
-
|
|
69
|
+
- Host only makes outbound HTTPS/WSS connections.
|
|
70
|
+
- Host/Client authenticate with long-lived X25519 keys using Noise IK.
|
|
71
|
+
- ApiProxy methods are allowlist-driven (fail-closed).
|
|
72
|
+
- Directory browsing is metadata-only.
|
|
73
|
+
- Sensitive capabilities are disabled, including shell, PTY, remote desktop, and file operations.
|
|
74
|
+
- Data is stored under `$DSH_HOME/remote/servers/<origin-hash>/{host,client}`. Unix private keys must be `0600`.
|
|
47
75
|
|
|
48
|
-
- Host
|
|
49
|
-
- Host
|
|
50
|
-
-
|
|
51
|
-
-
|
|
52
|
-
-
|
|
53
|
-
-
|
|
76
|
+
- Host 仅发起外连 HTTPS/WSS,不开放公网监听。
|
|
77
|
+
- Host/Client 使用长期 X25519 key + Noise IK 进行相互认证。
|
|
78
|
+
- ApiProxy 仅允许白名单方法(未命中即拒绝)。
|
|
79
|
+
- 目录浏览仅返回元数据,不涉及文件读写。
|
|
80
|
+
- Shell、PTY、远程桌面、文件操作等高风险能力已禁用。
|
|
81
|
+
- 数据位于 `$DSH_HOME/remote/servers/<origin-hash>/{host,client}`,私钥权限需 `0600`。
|
|
54
82
|
|
|
55
|
-
|
|
83
|
+
## Configuration and install / 配置与安装
|
|
56
84
|
|
|
57
|
-
|
|
85
|
+
Settings are written to `$DSH_HOME/settings.yaml` under `dsh-remote` (restart required).
|
|
58
86
|
|
|
59
|
-
|
|
87
|
+
配置写入 `$DSH_HOME/settings.yaml` 的 `dsh-remote`(重启后生效)。
|
|
60
88
|
|
|
61
89
|
```sh
|
|
62
90
|
export DSH_REMOTE_SERVER=https://dsh.r2049.cn
|
|
63
91
|
```
|
|
64
92
|
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
## 安装与构建
|
|
93
|
+
Install via DSH Desktop:
|
|
68
94
|
|
|
69
|
-
DSH Desktop
|
|
95
|
+
通过 DSH Desktop 安装:
|
|
70
96
|
|
|
71
97
|
```text
|
|
72
98
|
github:liguobao/deepseek-harness-remote#v0.2.23
|
|
73
99
|
```
|
|
74
|
-
|
|
75
|
-
本地验证:
|
|
76
|
-
|
|
77
|
-
```sh
|
|
78
|
-
pnpm --filter ds-harness-remote check
|
|
79
|
-
pnpm --filter ds-harness-remote test
|
|
80
|
-
pnpm --filter ds-harness-remote build
|
|
81
|
-
```
|
|
82
|
-
|
|
83
|
-
根包提供 GitHub Bundle manifest;本包是 npm 发布和 CI artifact 边界。构建会生成 `dist/index.js`、`dist/client.js` 和 GitHub client bundle。
|
|
84
|
-
|
|
85
|
-
## 发布与版本一致性要求
|
|
86
|
-
|
|
87
|
-
发布新版本前必须同步以下版本号:
|
|
88
|
-
|
|
89
|
-
- 根目录 `package.json` 的 `version`
|
|
90
|
-
- `packages/plugin/package.json` 的 `version`
|
|
91
|
-
- `packages/plugin/src/version.ts` 中的 `PLUGIN_VERSION`
|
|
92
|
-
|
|
93
|
-
`packages/plugin/scripts/verify-version-sync.mjs` 会在 `check/build/test` 前校验这三处是否一致。任一不一致将导致构建失败。
|
|
94
|
-
|
|
95
|
-
建议发布步骤:
|
|
96
|
-
|
|
97
|
-
1. 同步更新上述三个版本号。
|
|
98
|
-
2. 运行 `pnpm --filter ds-harness-remote check`。
|
|
99
|
-
3. 通过后再执行 `pnpm --filter ds-harness-remote build` 与 `test`。
|
|
100
|
-
|
|
101
|
-
## 兼容边界
|
|
102
|
-
|
|
103
|
-
Plugin 使用官方 `@deepseek-ai/dsh-host-apiproxy/api`,不维护第二套 Session、Event 或 Permission 协议。Server、Remote Web 和 Admin runtime 不在本仓库实现。协议详情见 [Remote Protocol](../../docs/protocol.md),Server 接入见 [Plugin integration](../../docs/plugin-integration.md)。
|
package/dist/index.js
CHANGED
|
@@ -12968,7 +12968,7 @@ function normalizeServerUrl(value) {
|
|
|
12968
12968
|
}
|
|
12969
12969
|
|
|
12970
12970
|
// src/version.ts
|
|
12971
|
-
var PLUGIN_VERSION = "0.3.
|
|
12971
|
+
var PLUGIN_VERSION = "0.3.13";
|
|
12972
12972
|
|
|
12973
12973
|
// src/server-api.ts
|
|
12974
12974
|
var HostServerApi = class {
|