dsh-remote 0.8.37 → 0.8.39

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.en.md CHANGED
@@ -39,7 +39,7 @@ The native **"Add workspace"** flow — a centered modal with two tabs, opening
39
39
 
40
40
  ## Features
41
41
 
42
- ![Capabilities at a glance — multi-machine SSH, live alias resolution, the two-tab picker, three-way sync, remote @ completion, a remote DSH Web UI in your local browser, health check & one-click deploy, audit, port forwarding, sidebar editing, self-update, and the 21 rw_* tools](docs/shots/features.png)
42
+ ![Capabilities at a glance — multi-machine SSH, live alias resolution, the two-tab picker, three-way sync, remote @ completion, a remote DSH Web UI in your local browser, health check & one-click deploy, audit, port forwarding, sidebar editing, self-update, and the 24 rw_* tools](docs/shots/features.png)
43
43
 
44
44
  The image above is the overview. What follows is only what the image does not make obvious.
45
45
 
@@ -56,7 +56,8 @@ The image above is the overview. What follows is only what the image does not ma
56
56
 
57
57
  The rest:
58
58
 
59
- - **21 model tools** (listed so they can be copied or searched): `rw_info`, `rw_connect`, `rw_pick_workspace`, `rw_list_dir`, `rw_stat`, `rw_read_file`, `rw_write_file`, `rw_edit`, `rw_append`, `rw_mkdir`, `rw_remove`, `rw_move`, `rw_exec`, `rw_search`, `rw_download`, `rw_upload`, `rw_sync`, `rw_push`, `rw_forward`, `rw_disconnect`, `rw_deploy_probe`.
59
+ - **25 model tools** (listed so they can be copied or searched): `rw_info`, `rw_connect`, `rw_machines`, `rw_pick_workspace`, `rw_list_dir`, `rw_stat`, `rw_read_file`, `rw_write_file`, `rw_edit`, `rw_append`, `rw_mkdir`, `rw_remove`, `rw_move`, `rw_exec`, `rw_search`, `rw_download`, `rw_upload`, `rw_sync`, `rw_push`, `rw_backup`, `rw_backup_list`, `rw_restore`, `rw_forward`, `rw_disconnect`, `rw_deploy_probe`.
60
+ - **Compressed workspace backup / restore** (`rw_backup` / `rw_backup_list` / `rw_restore`) — archive a remote workspace to `.tar.gz` (everything is included by default; pass excludes for `node_modules`, `/build/`, `*.log` and friends). The archive can stay on the remote under `$HOME/.dsh-remote/backups`, be pulled to this machine, or **both**. Before restoring, the archive is verified; **a corrupt archive is refused and the target is left untouched**. `mode=replace` (default) swaps the whole tree, `mode=merge` only overwrites without deleting. The settings page has a **Backup** card too (create / download / restore / delete).
60
61
  - **Open a remote machine's DSH Web UI locally** (`0.8.36+`) — nothing has to be exposed on the remote: the plugin SSHes out, starts a `dsh web` there that binds **`127.0.0.1` only**, and tunnels its port back to a loopback port on this machine. The URL carries a one-time login token, consumed once by a redirect.
61
62
  - **One-click health check & deploy** (`0.8.36+`) — **a failed connection is usually the remote dsh version or environment, not the plugin.** The read-only check reports platform / node / npm / dsh version / **whether the native module can load** / proxy and npm registry, with a suggested fix; "Deploy & verify" installs into a remote **private directory** (no system directory, no PATH change, no replacing the version you use — deleting it is a complete rollback) and verifies step by step. If that still fails, the built-in `dsh-remote-deploy` skill takes over.
62
63
  - **Cross-platform remotes** — all file access is SFTP-protocol-level (no POSIX shell), so Linux/macOS/Windows remotes all work.
@@ -263,6 +264,9 @@ Deploying to a product profile is a separate, explicit action (`./sync.sh`) for
263
264
  | `webInstallPrefix` | string | `''` | where an automatic deployment installs dsh; empty means `$HOME/.dsh-remote/dsh` (no system directory, no PATH change) |
264
265
  | `webInstallVersion` | string | `0.1.5-rc.2` | dsh version an automatic deployment installs; the default is the first that can start the web surface on Linux |
265
266
  | `webInstallRegistry` | string | `''` | npm registry for the install; **empty keeps the remote's own config**, so an internal mirror is never overridden |
267
+ | `backupDir` | string | `''` | Where backup archives are written **on the remote**; empty means `$HOME/.dsh-remote/backups` (resolved on the remote, never guessed from this machine's home) |
268
+ | `backupExcludes` | string[] | `[]` | Paths excluded from backups by default (gitignore-style). **Empty by default**: silently omitting directories is how a restore becomes silent data loss |
269
+ | `maxBackupTransferBytes` | int | `2147483648` | Cap (bytes) on moving an archive between this machine and the remote; **the remote archive is never truncated** — this only bounds the optional cross-machine copy. 0 = unlimited |
266
270
 
267
271
  > The authoritative list is the `Config` schema in `lib/index.js`; this table mirrors it.
268
272
 
package/README.md CHANGED
@@ -39,13 +39,14 @@ DSH 的 Web 界面刻意只监听 `127.0.0.1`(CLI 为安全拒绝 `--host 0.0.
39
39
 
40
40
  ## 功能
41
41
 
42
- ![核心能力总览 — 多机 SSH / 别名实时解析 / 双 tab 选择器 / 三路同步 / 远程 @ 补全 / 远端 DSH 界面挂到本机 / 体检与一键部署 / 安全审计 / 端口转发 / 侧栏编辑 / 自动更新,以及 21 个 rw_* 工具](docs/shots/features.png)
42
+ ![核心能力总览 — 多机 SSH / 别名实时解析 / 双 tab 选择器 / 三路同步 / 远程 @ 补全 / 远端 DSH 界面挂到本机 / 体检与一键部署 / 安全审计 / 端口转发 / 侧栏编辑 / 自动更新,以及 25 个 rw_* 工具](docs/shots/features.png)
43
43
 
44
44
  上图是能力总览;下面只列**上图没说清、但用起来需要知道**的部分。
45
45
 
46
46
  其余要点:
47
47
 
48
- - **21 个模型工具**(便于复制/检索):`rw_info`、`rw_connect`、`rw_pick_workspace`、`rw_list_dir`、`rw_stat`、`rw_read_file`、`rw_write_file`、`rw_edit`、`rw_append`、`rw_mkdir`、`rw_remove`、`rw_move`、`rw_exec`、`rw_search`、`rw_download`、`rw_upload`、`rw_sync`、`rw_push`、`rw_forward`、`rw_disconnect`、`rw_deploy_probe`。
48
+ - **25 个模型工具**(便于复制/检索):`rw_info`、`rw_connect`、`rw_machines`、`rw_pick_workspace`、`rw_list_dir`、`rw_stat`、`rw_read_file`、`rw_write_file`、`rw_edit`、`rw_append`、`rw_mkdir`、`rw_remove`、`rw_move`、`rw_exec`、`rw_search`、`rw_download`、`rw_upload`、`rw_sync`、`rw_push`、`rw_backup`、`rw_backup_list`、`rw_restore`、`rw_forward`、`rw_disconnect`、`rw_deploy_probe`。
49
+ - **工作区压缩备份 / 恢复**(`rw_backup` / `rw_backup_list` / `rw_restore`)—— 把远程工作区打成 `.tar.gz`(默认全部收录,另可按参数排除 `node_modules`、`/build/`、`*.log` 等);归档可留在远端 `$HOME/.dsh-remote/backups`,也可拉到本机或**两边都留**。恢复前先校验归档可读,**归档损坏则拒绝执行、目标目录原封不动**;`mode=replace`(默认)整树替换、`mode=merge` 只覆盖不删除。设置页里也有「备份」卡片(新建 / 下载 / 恢复 / 删除)。
49
50
  - **把远端机器的 DSH 界面挂到本机**(`0.8.36+`)—— 不用在远端开任何端口:插件主动 SSH 连过去,在远端**只监听 `127.0.0.1`** 地起一个 `dsh web`,再把端口经隧道搬回本机的一个 loopback 端口。地址带一次性登录令牌,只在本机这次跳转里用一次。
50
51
  - **连不上时一键体检与部署**(`0.8.36+`)—— **连不上大多不是插件的问题,而是远端 dsh 的版本或环境不对**。体检(只读)会报出平台/node/npm/dsh 版本、**原生模块能否启动**、代理与 npm 源,并给出修复建议;「部署并验证」把它装到远端**私有目录**(不写系统目录、不改 PATH、不覆盖你在用的版本,删目录即回滚)并逐步校验。失败还能交给内置的 `dsh-remote-deploy` 技能排查。
51
52
  - **远端跨平台** —— 文件访问走 SFTP 协议层(不依赖 POSIX shell),Linux/macOS/Windows 远端都能列/读/写/搜索/同步。
@@ -245,6 +246,9 @@ scripts/dev-run.sh --status # 是否在运行
245
246
  | `webInstallPrefix` | string | `''` | 自动部署装到远端的哪个目录;留空用 `$HOME/.dsh-remote/dsh`(不写系统目录、不改 PATH) |
246
247
  | `webInstallVersion` | string | `0.1.5-rc.2` | 自动部署安装的 dsh 版本;默认值是第一个在 Linux 上能启动 web 的版本 |
247
248
  | `webInstallRegistry` | string | `''` | 安装用的 npm 源;**留空沿用远端自己的配置**,不会覆盖内网镜像 |
249
+ | `backupDir` | string | `''` | 备份归档在**远端**的存放目录;留空用 `$HOME/.dsh-remote/backups`(在远端解析,不用本机 home 猜) |
250
+ | `backupExcludes` | string[] | `[]` | 备份默认排除的路径(gitignore 风格)。**默认为空**:静默少打包目录正是「恢复即静默丢数据」的成因 |
251
+ | `maxBackupTransferBytes` | int | `2147483648` | 归档在本机与远端之间搬运的大小上限(字节);**远端的归档从不截断**,只约束可选的对拷。0 = 不限 |
248
252
 
249
253
  > 权威清单是 `lib/index.js` 里的 `Config` schema,本表与之一致。
250
254