dsh-remote 0.8.54 → 0.8.61
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 +19 -3
- package/README.md +18 -4
- package/lib/client.js +360 -79
- package/lib/credential.js +52 -4
- package/lib/errors.js +34 -3
- package/lib/index.js +229 -30
- package/lib/instructions.js +288 -288
- package/lib/pool.js +10 -1
- package/lib/registry.js +118 -4
- package/lib/routes-fs.js +14 -2
- package/lib/web-deploy.js +7 -1
- package/package.json +7 -3
package/README.en.md
CHANGED
|
@@ -102,10 +102,11 @@ Since **v0.8.18** it installs and mounts only itself; the Web sidebar ([dsh-bett
|
|
|
102
102
|
|
|
103
103
|
## Quick start
|
|
104
104
|
|
|
105
|
-
1. **
|
|
106
|
-
|
|
105
|
+
1. **Connect a machine** — Settings → 远程工作区: the page **lists the hosts from your `~/.ssh/config`** (like VSCode Remote-SSH). Click **Connect** — it adopts the host, makes it current and probes it, with the result shown on that row. A machine that is *not* in your ssh config is one click away under "手动添加(密码 / 私钥 / 跳板机)".
|
|
106
|
+
> **Saved ≠ active:** a saved machine is only a standby connection; only Connect (or the agent's `rw_connect`) puts it into the session's remote context.
|
|
107
|
+
2. **Open a workspace** — the folder picker opens right after a successful connect (or click **选目录** on any saved machine):
|
|
108
|
+
- **Remote** → browse to a remote directory (or type `/path`) → "设为远程工作区" ⇒ a local mirror workspace is created and adopted.
|
|
107
109
|
- **Local** → system folder chooser (or type a path) → local workspace. Falls back to the in-app browser when no OS dialog exists.
|
|
108
|
-
- **Remote** → choose the machine → browse to a remote directory (or type `/path`) → "设为远程工作区" ⇒ a local mirror workspace is created and adopted.
|
|
109
110
|
3. **Work with the agent** — treat it like any workspace: `rw_read_file` / `rw_write_file` / `rw_edit` / `rw_exec` / `rw_search` / `rw_sync` / `rw_push` / `rw_forward` (full list above).
|
|
110
111
|
|
|
111
112
|
> **Remote context is session-scoped:** the "Remote workspace" system-prompt section appears only when the current session's workspace is a remote mirror; local sessions are unaffected and the model will not call `rw_*` on its own.
|
|
@@ -355,6 +356,21 @@ Host devbox
|
|
|
355
356
|
|
|
356
357
|
**How are passwords stored?** — tick "encrypt password": macOS Keychain / Windows DPAPI / Linux secret-tool (libsecret); falls back to plaintext when unavailable.
|
|
357
358
|
|
|
359
|
+
**Why is the password box empty (where are the stars)?** — No secret is ever sent back to the browser, so the input stays empty; when a password IS saved its placeholder reads
|
|
360
|
+
`•••••••• (saved — leave blank to keep)` with a hint underneath. Saving with an empty box keeps the stored password; typing a new value replaces it. Same for the private-key
|
|
361
|
+
passphrase and the jump-host password. The password badge in the machine row means exactly this (a keychain-stored password counts as saved).
|
|
362
|
+
|
|
363
|
+
**Which password does "Test connection" use?** — The form in front of you, but a blank password / key / passphrase **falls back to the value saved for that machine**, so
|
|
364
|
+
"edit a machine that already connects → click test" now works (the success line says the saved password was used). After saving, the form stays bound to that machine so you can
|
|
365
|
+
test immediately; press "Cancel edit" to start over.
|
|
366
|
+
|
|
367
|
+
**"No credentials" even though you filled it in** — the password never actually landed on disk: when "encrypt password" is ticked and the OS store is unavailable the plugin
|
|
368
|
+
**refuses** to write plaintext and reports a warning (`credentialFallback` defaults to `refuse`). Look for the red warning after saving, fix the store and save again, or use
|
|
369
|
+
"Test connection" to verify on the spot. A machine with no password / key / agent is flagged in amber right inside the form.
|
|
370
|
+
|
|
371
|
+
**"SSH agent unavailable"** — the machine has "use SSH agent" ticked but the DSH host process has no `SSH_AUTH_SOCK` (Windows has no agent service by default). Start an agent
|
|
372
|
+
(and export `SSH_AUTH_SOCK`, or use Pageant) before launching DSH — or untick it and save a password / private key instead.
|
|
373
|
+
|
|
358
374
|
**The plugin vanished after a DSH upgrade** — DSH's compatibility check dropped the bundle; upgrade to **0.8.29+** (see "DSH version compatibility" above).
|
|
359
375
|
|
|
360
376
|
**"Remote DSH Web UI" will not connect / spins forever** — first check that `dsh web` starts on that
|
package/README.md
CHANGED
|
@@ -92,11 +92,12 @@ dsh plugin add dsh-remote
|
|
|
92
92
|
|
|
93
93
|
## 快速上手
|
|
94
94
|
|
|
95
|
-
1.
|
|
96
|
-
|
|
97
|
-
|
|
95
|
+
1. **连接一台机器** —— 设置 → 远程工作区:页面**直接列出 `~/.ssh/config` 里的主机**(像 VSCode Remote-SSH),点「连接」即可(= 采用 + 设为当前 + 实测延迟,结果显示在这一行上)。
|
|
96
|
+
没有写进 ssh 配置的机器,展开「手动添加(密码 / 私钥 / 跳板机)」填一次即可。
|
|
97
|
+
> **保存 ≠ 激活**:保存只是备用连接;只有「连接」(或 Agent 调 `rw_connect`)才进入会话的 remote context。
|
|
98
|
+
2. **选工作区** —— 连上之后会自动弹出目录选择(也可以点机器行的「选目录」):
|
|
99
|
+
- **远程** → 浏览到远程目录(或输入 `/path`)→ 「设为远程工作区」⇒ 创建并收养本地镜像工作区。
|
|
98
100
|
- **本机** → 系统文件夹选择(或手输路径)→ 本地工作区。宿主没有可用系统对话框时改用插件内置浏览器。
|
|
99
|
-
- **远程** → 选机器 → 浏览到远程目录(或输入 `/path`)→ 「设为远程工作区」⇒ 创建并收养本地镜像工作区。
|
|
100
101
|
3. **让 Agent 工作** —— 当作普通工作区使用,例如 `rw_read_file` / `rw_write_file` / `rw_edit` / `rw_exec` / `rw_search` / `rw_sync` / `rw_push` / `rw_forward`(完整列表见上文)。
|
|
101
102
|
|
|
102
103
|
> **Remote context 是 session 级的**:只有当前 session 的工作区是某个远程镜像时,system prompt 才注入「Remote workspace」段落;普通本地 session 不受影响,模型也不会主动调 `rw_*`。
|
|
@@ -426,6 +427,19 @@ Host devbox
|
|
|
426
427
|
|
|
427
428
|
**密码怎么加密保存** —— 勾选「加密保存密码」:macOS 钥匙串 / Windows DPAPI / Linux secret-tool(libsecret);后端不可用时回退明文。
|
|
428
429
|
|
|
430
|
+
**密码框为什么是空的(星号在哪)** —— 出于安全,**任何密码都不会回传到浏览器**,所以输入框永远是空的;已经保存过密码时,输入框的占位符会显示
|
|
431
|
+
`••••••••(已保存,留空 = 不修改)`,下方还有一行绿字说明。留空保存 = 沿用已保存的密码,填新值 = 覆盖。passphrase 与跳板机密码同理。
|
|
432
|
+
机器列表里的「密码」标签也是这个含义(钥匙串里的密码同样算已保存)。
|
|
433
|
+
|
|
434
|
+
**「测试连接」用哪个密码** —— 用你眼前这份表单,但**留空的密码/私钥/passphrase 会自动沿用该机器已保存的值**,所以「编辑一台已经连上的机器 → 直接点测试」是能过的
|
|
435
|
+
(成功提示会注明「本次测试使用了已保存的密码」)。保存之后表单会**留在该机器上**,可以立刻点测试验证;想清空重来点「取消编辑」。
|
|
436
|
+
|
|
437
|
+
**报「缺少凭据」但你确信填过** —— 说明保存时密码没有真正落盘:勾了「加密保存密码」而系统钥匙库不可用时,插件会**拒绝**把密码写成明文并给出警告
|
|
438
|
+
(`credentialFallback` 默认 `refuse`)。看保存后有没有红色警告,按提示修好钥匙库再存一次,或用「测试连接」当场验证。机器没有密码/私钥/agent 时,编辑表单里会直接标黄提醒。
|
|
439
|
+
|
|
440
|
+
**报「SSH agent 不可用」** —— 该机器勾了「使用 SSH agent」,但 DSH 宿主进程里没有 `SSH_AUTH_SOCK`(Windows 默认没有 agent 服务)。启动 DSH 之前把 agent 跑起来并导出
|
|
441
|
+
`SSH_AUTH_SOCK`(或用 Pageant),或者取消勾选、改用密码/私钥。
|
|
442
|
+
|
|
429
443
|
**升级后插件整个不见了** —— DSH 兼容性判定丢弃了 bundle,升到 **0.8.29+** 即可(见上文「DSH 版本兼容性」)。
|
|
430
444
|
|
|
431
445
|
**「远程 DSH 界面」连不上/一直转圈** —— 先确认那台机器上的 `dsh web` **本身**能起来。
|