dsh-remote 1.4.1 → 1.5.0

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
@@ -18,7 +18,7 @@ Use the normal layout or choose the optional **three-column IDE layout** to view
18
18
 
19
19
  <img src="https://raw.githubusercontent.com/flymysql/dsh-remote/main/docs/shots/workbench-ide.png" alt="DSH remote IDE with file tree, native code editor and agent conversation" width="1200"/>
20
20
 
21
- [1.4.1 release notes](https://github.com/flymysql/dsh-remote/blob/main/docs/release/1.4.1.md): Windows OpenSSH connect and platform-detection fixes, opaque IDE floors for wallpaper themes.
21
+ [1.5.0 release notes](https://github.com/flymysql/dsh-remote/blob/main/docs/release/1.5.0.md): attach tunnels self-heal after link flaps, downloads can land on the machine running the browser, 6x faster commands on high-RTT links, a plain-login terminal mode for bastion gateways.
22
22
 
23
23
  ## Install
24
24
 
package/README.md CHANGED
@@ -26,7 +26,7 @@ dsh plugin --profile web add dsh-remote
26
26
 
27
27
  安装或升级后,重启 DSH Web 并刷新页面。自动更新状态在设置 → 远程工作区 → 插件偏好中查看。
28
28
 
29
- [1.4.1 更新说明](https://github.com/flymysql/dsh-remote/blob/main/docs/release/1.4.1.md):Windows OpenSSH 连接与平台探测修复、IDE 模式壁纸主题底板加固。
29
+ [1.5.0 更新说明](https://github.com/flymysql/dsh-remote/blob/main/docs/release/1.5.0.md):Web 隧道断链自愈、下载到浏览器所在机器、高 RTT 提速 6 倍、堡垒机终端纯登录模式。
30
30
 
31
31
  ## 3 步开始
32
32
 
package/lib/boot.js CHANGED
@@ -10,6 +10,7 @@ export const win32FolderPickScript = main.win32FolderPickScript
10
10
  export const LOCAL_BOOTSTRAP_TOOLS = main.LOCAL_BOOTSTRAP_TOOLS
11
11
  export const normalizeLocalTools = main.normalizeLocalTools
12
12
  export const pickWorkspaceNextStep = main.pickWorkspaceNextStep
13
+ export const pickWorkspaceRebindNote = main.pickWorkspaceRebindNote
13
14
  export const inject = main.inject
14
15
  export const Config = main.Config
15
16
  export const apply = main.apply
package/lib/client.js CHANGED
@@ -27,7 +27,7 @@ window.__ModuleLoader__.load({
27
27
 
28
28
  const React = require('react')
29
29
  const name = 'dsh-remote'
30
- const CLIENT_VERSION = '1.4.1'
30
+ const CLIENT_VERSION = '1.5.0'
31
31
 
32
32
  // ── optional host primitives ────────────────────────────────────────────
33
33
  // Issue #74: a remote session's .md link must open over SFTP, NOT via the
@@ -405,6 +405,16 @@ window.__ModuleLoader__.load({
405
405
  'settings.backendOpensshAliasOk': '已勾选「使用 ssh_config 别名」:主机名原样交给 ssh,端口/用户/私钥/跳板机一律由 ~/.ssh/config 的 Host 块决定,对应的输入框在 openssh 后端下填了也不生效(这就是「配置唯一来源」,issue #50)。密码/Passphrase 仍会通过 askpass 交给 ssh,仅当 Host 块里没有可用认证时才用得上。',
406
406
  'settings.sshBinary': 'ssh 路径',
407
407
  'settings.sshBinaryPlaceholder': '留空 = 用 PATH 里的 ssh',
408
+ // Issue #206: the per-machine shell was only reachable by hand-editing
409
+ // machines.json — and applyMachine dropped it anyway. It is an ordinary
410
+ // machine field with an input now.
411
+ 'settings.shell': '远端 Shell',
412
+ 'settings.shellPlaceholder': '留空 = 自动探测(where bash)',
413
+ 'settings.shellHint': 'Windows 远端专用:指定 bash.exe 的路径或包装脚本,覆盖自动探测。例如自动探测到的是 WSL 启动器 stub、或 Git Bash 需要包装才能在 sshd 的 stdio 下存活时使用。POSIX 远端留空即可。',
414
+ // Issue #212: JumpServer 类网关对带命令的会话不分配远端 PTY。
415
+ 'settings.terminalNoCommand': '终端纯登录',
416
+ 'settings.terminalNoCommandLabel': '终端用纯登录(堡垒机 / 网关适用)',
417
+ 'settings.terminalNoCommandHint': 'JumpServer 类网关只给「不带命令的登录」分配远端 PTY:带命令时(即使 -tt)没有行纪律,回车不生效、按键看似无响应。勾选后生成的终端 launcher 只发纯登录,不再自动 cd 到工作区,但拿到真 PTY(zsh 行编辑、窗口缩放正常)。直连普通 sshd 的机器不要勾。',
408
418
  // Issue #54: the README told users to point `webAttachCommand` at a
409
419
  // private-prefix dsh, but the settings UI offered nowhere to type it —
410
420
  // it could only be written by the deploy flow or by hand-editing
@@ -695,6 +705,13 @@ window.__ModuleLoader__.load({
695
705
  'explorer.menuExpand': '📂 展开/收起',
696
706
  'explorer.menuOpen': '📄 打开文件',
697
707
  'explorer.menuDownload': '⬇ 下载到本地镜像',
708
+ 'explorer.menuDownloadLocal': '⬇ 下载到本机',
709
+ 'explorer.downloadLocal': '下载到本机',
710
+ // Issue #207: mirror downloads are invisible without a picker — say
711
+ // where the file landed and offer to reveal it.
712
+ 'explorer.downloadedNote': '已下载到本地镜像:{path}',
713
+ 'explorer.showInFolder': '在文件夹中显示',
714
+ 'explorer.dismissNote': '关闭提示',
698
715
  'explorer.menuCopyRel': '📋 复制相对地址',
699
716
  'explorer.menuCopyAbs': '📋 复制绝对地址',
700
717
  'explorer.menuRename': '✏ 重命名',
@@ -724,6 +741,7 @@ window.__ModuleLoader__.load({
724
741
  'file.dirty': '未保存',
725
742
  'file.saveHint': 'Ctrl/⌘+S 保存',
726
743
  'file.downloaded': '已下载到本地镜像{local}',
744
+ 'file.downloadedToComputer': '已开始下载到本机',
727
745
  'file.downloadedAt': ': {path}',
728
746
  'file.localCopyMissing': '远端没有此文件,但本地镜像中有同名副本。',
729
747
  'file.localCopyHelp': '可先只读查看,确认后上传到远端。上传仅创建新文件,不覆盖已有文件。',
@@ -1033,6 +1051,14 @@ window.__ModuleLoader__.load({
1033
1051
  'settings.backendOpensshAliasOk': '"Use a ~/.ssh/config alias" is on: the name is handed to ssh verbatim, and Port/User/IdentityFile/ProxyJump come from that Host block — the matching fields below have no effect (this is the "one source of truth" case, issue #50). A password/passphrase is still offered to ssh through askpass, and is only used if the Host block has no usable authentication.',
1034
1052
  'settings.sshBinary': 'ssh path',
1035
1053
  'settings.sshBinaryPlaceholder': 'Empty = the ssh on PATH',
1054
+ // Issue #206: the per-machine shell gets a settings input.
1055
+ 'settings.shell': 'Remote shell',
1056
+ 'settings.shellPlaceholder': 'Empty = auto-detect (where bash)',
1057
+ 'settings.shellHint': 'Windows remotes only: the bash.exe path (or a wrapper script) to use as the remote shell, overriding auto-detection — e.g. when auto-detect finds the WSL launcher stub, or your Git Bash needs a wrapper to survive sshd. Leave empty on POSIX remotes.',
1058
+ // Issue #212: gateways that allocate a remote PTY only for plain logins.
1059
+ 'settings.terminalNoCommand': 'Plain-login terminal',
1060
+ 'settings.terminalNoCommandLabel': 'Terminal dials a plain login (bastion / gateway hosts)',
1061
+ 'settings.terminalNoCommandHint': 'JumpServer-class gateways allocate a remote PTY only for logins WITHOUT a command: with one (even with -tt) there is no line discipline — Return does nothing and keys look dead. When checked, the generated terminal launcher sends a plain login instead of the cd-and-exec line: you get a real PTY (zsh line editing, window resize) at the cost of the automatic cd into the workspace. Leave unchecked for direct sshd hosts.',
1036
1062
  // Issue #54: the README documented `webAttachCommand` but the settings
1037
1063
  // UI had no field for it.
1038
1064
  'settings.webAttachCmd': 'Remote dsh command',
@@ -1318,6 +1344,13 @@ window.__ModuleLoader__.load({
1318
1344
  'explorer.menuExpand': '📂 Expand/collapse',
1319
1345
  'explorer.menuOpen': '📄 Open file',
1320
1346
  'explorer.menuDownload': '⬇ Download to local mirror',
1347
+ 'explorer.menuDownloadLocal': '⬇ Download to this computer',
1348
+ 'explorer.downloadLocal': 'Download to this computer',
1349
+ // Issue #207: mirror downloads are invisible without a picker — say
1350
+ // where the file landed and offer to reveal it.
1351
+ 'explorer.downloadedNote': 'Downloaded to the local mirror: {path}',
1352
+ 'explorer.showInFolder': 'Show in folder',
1353
+ 'explorer.dismissNote': 'Dismiss',
1321
1354
  'explorer.menuCopyRel': '📋 Copy relative path',
1322
1355
  'explorer.menuCopyAbs': '📋 Copy absolute path',
1323
1356
  'explorer.menuRename': '✏ Rename',
@@ -1347,6 +1380,7 @@ window.__ModuleLoader__.load({
1347
1380
  'file.dirty': 'unsaved',
1348
1381
  'file.saveHint': 'Ctrl/⌘+S to save',
1349
1382
  'file.downloaded': 'Downloaded to local mirror{local}',
1383
+ 'file.downloadedToComputer': 'Download started on this computer',
1350
1384
  'file.downloadedAt': ': {path}',
1351
1385
  'file.localCopyMissing': 'This file is missing remotely. A copy exists in the local mirror.',
1352
1386
  'file.localCopyHelp': 'Preview the local copy, then upload it. Upload creates a new remote file and never replaces an existing file.',
@@ -1492,6 +1526,41 @@ window.__ModuleLoader__.load({
1492
1526
  return Object.assign({}, body || {}, { sessionId }, localWorkspaceSession(sessionId) ? { workspace: 'local' } : {})
1493
1527
  }
1494
1528
 
1529
+ /**
1530
+ * Save a remote (or local-workspace) file on the machine running the BROWSER.
1531
+ *
1532
+ * The mirror download (POST /dsh-remote/fs op=download) only writes on the
1533
+ * DSH host, so a user who opens the page from their own desktop had no way to
1534
+ * get the file. The host streams it from /dsh-remote/download and the browser
1535
+ * saves it; failures (too large, gone, wrong session) reject instead of
1536
+ * silently saving a JSON error as if it were the file.
1537
+ */
1538
+ function downloadRemoteFileToClient(sessionId, filePath) {
1539
+ const url = withSessionQuery(apiPath('/dsh-remote/download') + '?path=' + encodeURIComponent(filePath), sessionId)
1540
+ return fetch(url, { credentials: 'same-origin' }).then(async (res) => {
1541
+ if (!res.ok) {
1542
+ const data = await res.json().catch(() => ({}))
1543
+ throw new Error(trHostError((data && (data.error || data.message))) || 'HTTP ' + res.status)
1544
+ }
1545
+ const named = res.headers.get('X-Dsh-Download-Name') || ''
1546
+ let name = String(filePath).split(/[\\/]/).filter(Boolean).pop() || 'download'
1547
+ if (named) { try { name = decodeURIComponent(named) } catch { /* keep the basename */ } }
1548
+ const blob = await res.blob()
1549
+ const href = URL.createObjectURL(blob)
1550
+ try {
1551
+ const anchor = document.createElement('a')
1552
+ anchor.href = href
1553
+ anchor.download = name
1554
+ anchor.rel = 'noopener'
1555
+ anchor.style.display = 'none'
1556
+ document.body.appendChild(anchor)
1557
+ anchor.click()
1558
+ window.setTimeout(() => { try { anchor.remove(); URL.revokeObjectURL(href) } catch { /* ignore */ } }, 1000)
1559
+ } catch (err) { URL.revokeObjectURL(href); throw err }
1560
+ return name
1561
+ })
1562
+ }
1563
+
1495
1564
  async function api(method, path, body, signal) {
1496
1565
  const opts = { method, headers: {}, ...(signal ? { signal } : {}) }
1497
1566
  if (body) { opts.headers['Content-Type'] = 'application/json'; opts.body = JSON.stringify(body) }
@@ -2350,6 +2419,10 @@ window.__ModuleLoader__.load({
2350
2419
  proxyUser: (m.proxy && m.proxy.username) || '', proxyPassword: '', proxyKey: (m.proxy && m.proxy.privateKeyPath) || '',
2351
2420
  // Issue #51: the transport backend is per machine.
2352
2421
  backend: m.backend === 'openssh' ? 'openssh' : 'native', sshBinary: m.sshBinary || '',
2422
+ // Issue #206: the per-machine remote shell (Windows remotes).
2423
+ shell: m.shell || '',
2424
+ // Issue #212: plain-login terminal for PTY-stingy gateways.
2425
+ terminalNoCommand: !!m.terminalNoCommand,
2353
2426
  // Issue #54: the per-machine remote-dsh command for Web UI attach.
2354
2427
  webAttachCommand: m.webAttachCommand || '',
2355
2428
  // Issue #125: its resident-instance discover sibling.
@@ -2366,7 +2439,7 @@ window.__ModuleLoader__.load({
2366
2439
  setForm(next)
2367
2440
  setFormOpen(true)
2368
2441
  // 编辑时若该机器用了高级配置(私钥/agent/跳板/钥匙串/系统 OpenSSH 后端),自动展开折叠区
2369
- setAdvOpen(!!(m.privateKeyPath || m.useAgent || m.keyboardInteractive || (m.proxy && m.proxy.host) || m.backend === 'openssh' || m.webAttachCommand || m.webAttachDiscoverCommand || (m.credentialBackend && m.credentialBackend !== 'plain')))
2442
+ setAdvOpen(!!(m.privateKeyPath || m.useAgent || m.keyboardInteractive || (m.proxy && m.proxy.host) || m.backend === 'openssh' || m.shell || m.webAttachCommand || m.webAttachDiscoverCommand || (m.credentialBackend && m.credentialBackend !== 'plain')))
2370
2443
  }
2371
2444
  const startEdit = (machine) => {
2372
2445
  if (busy) return
@@ -2383,7 +2456,7 @@ window.__ModuleLoader__.load({
2383
2456
  }
2384
2457
  const clearForm = () => {
2385
2458
  setFormOpen(false)
2386
- setForm({ name: '', host: '', port: '22', username: 'root', password: '', privateKeyPath: '', passphrase: '', workspace: '', hostKeyMode: '', useAgent: false, keyboardInteractive: false, encryptPassword: false, proxyHost: '', proxyPort: '22', proxyUser: '', proxyPassword: '', proxyKey: '', backend: 'native', sshBinary: '', webAttachCommand: '', webAttachDiscoverCommand: '', id: '', useSshConfig: false, passwordSet: false, passphraseSet: false, proxyPasswordSet: false })
2459
+ setForm({ name: '', host: '', port: '22', username: 'root', password: '', privateKeyPath: '', passphrase: '', workspace: '', hostKeyMode: '', useAgent: false, keyboardInteractive: false, encryptPassword: false, proxyHost: '', proxyPort: '22', proxyUser: '', proxyPassword: '', proxyKey: '', backend: 'native', sshBinary: '', shell: '', terminalNoCommand: false, webAttachCommand: '', webAttachDiscoverCommand: '', id: '', useSshConfig: false, passwordSet: false, passphraseSet: false, proxyPasswordSet: false })
2387
2460
  }
2388
2461
  const save = (action) => {
2389
2462
  if (busy) return
@@ -2400,6 +2473,10 @@ window.__ModuleLoader__.load({
2400
2473
  encryptPassword: form.encryptPassword, useSshConfig: !!form.useSshConfig,
2401
2474
  // Issue #51: the transport backend (and, for `openssh`, the executable).
2402
2475
  backend: form.backend || 'native', sshBinary: form.sshBinary || '',
2476
+ // Issue #206: the per-machine remote shell (Windows remotes).
2477
+ shell: form.shell || '',
2478
+ // Issue #212: plain-login terminal for PTY-stingy gateways.
2479
+ terminalNoCommand: !!form.terminalNoCommand,
2403
2480
  // Issue #54: the per-machine remote-dsh command for Web UI attach.
2404
2481
  webAttachCommand: form.webAttachCommand || '',
2405
2482
  // Issue #125: the per-machine resident-instance discover command.
@@ -2932,6 +3009,11 @@ window.__ModuleLoader__.load({
2932
3009
  (form.backend === 'openssh')
2933
3010
  ? row(tr('settings.sshBinary'), React.createElement('input', { value: form.sshBinary || '', onChange: setF('sshBinary'), placeholder: tr('settings.sshBinaryPlaceholder'), style: inputS }), 'sb')
2934
3011
  : null,
3012
+ // Issue #206: where the Git Bash wrapper comes from on Windows
3013
+ // remotes (empty = auto-detect). Both backends' detection reads it,
3014
+ // so it renders for either backend, right after sshBinary.
3015
+ row(tr('settings.shell'), React.createElement('input', { 'data-testid': 'machine-shell', value: form.shell || '', onChange: setF('shell'), placeholder: tr('settings.shellPlaceholder'), style: inputS }), 'msh'),
3016
+ React.createElement('div', { style: { paddingLeft: LABEL_W + 12, marginBottom: 8, fontSize: 11, lineHeight: 1.5, opacity: 0.7 } }, tr('settings.shellHint')),
2935
3017
  row(tr('settings.privateKey'), React.createElement('input', { value: form.privateKeyPath, onChange: setF('privateKeyPath'), placeholder: 'Empty = password or agent', style: inputS }), 'k'),
2936
3018
  row(tr('settings.passphrase'), React.createElement('input', { type: 'password', value: form.passphrase, onChange: setF('passphrase'), placeholder: form.passphraseSet ? tr('settings.secretSavedPlaceholder') : 'Encrypted private key passphrase', style: inputS, title: form.passphraseSet ? tr('settings.secretSavedHint') : '' }), 'pp'),
2937
3019
  form.passphraseSet
@@ -2942,6 +3024,12 @@ window.__ModuleLoader__.load({
2942
3024
  React.createElement(RwCheckbox, { checked: form.useAgent, onChange: setB('useAgent'), label: tr('settings.agent') }),
2943
3025
  React.createElement(RwCheckbox, { checked: form.keyboardInteractive, onChange: setB('keyboardInteractive'), label: tr('settings.keyboardInteractive') }),
2944
3026
  React.createElement(RwCheckbox, { checked: form.encryptPassword, onChange: setB('encryptPassword'), label: tr('settings.encryptPassword') })),
3027
+ // Issue #212: gateways (JumpServer-class bastions) that allocate a
3028
+ // remote PTY only for plain logins need the terminal launcher to
3029
+ // dial WITHOUT the cd-and-exec command; otherwise the shell has no
3030
+ // line discipline and keys look dead.
3031
+ row(tr('settings.terminalNoCommand'), React.createElement(RwCheckbox, { 'data-testid': 'terminal-no-command', checked: !!form.terminalNoCommand, onChange: () => setForm((f) => ({ ...f, terminalNoCommand: !f.terminalNoCommand })), label: tr('settings.terminalNoCommandLabel') }), 'tnc'),
3032
+ React.createElement('div', { style: { paddingLeft: LABEL_W + 12, marginBottom: 8, fontSize: 11, lineHeight: 1.5, opacity: 0.7 } }, tr('settings.terminalNoCommandHint')),
2945
3033
  row(tr('settings.proxyHost'), React.createElement('input', { value: form.proxyHost, onChange: setF('proxyHost'), placeholder: 'Route through this host (optional)', style: inputS }), 'ph'),
2946
3034
  row(tr('settings.proxyPortUser'), React.createElement('div', { style: { display: 'flex', gap: 6, flex: 1, flexWrap: 'wrap' } },
2947
3035
  React.createElement('input', { value: form.proxyPort, onChange: setF('proxyPort'), placeholder: 'Port (22)', style: { ...inputS, minWidth: 90, maxWidth: 120 } }),
@@ -4972,6 +5060,7 @@ window.__ModuleLoader__.load({
4972
5060
  right: 'm6 4 4 4-4 4',
4973
5061
  left: 'm10 4-4 4 4 4',
4974
5062
  more: 'M3 8h.01M8 8h.01M13 8h.01',
5063
+ download: 'M8 2v8m0 0 3.2-3.2M8 10 4.8 6.8M2.5 13h11',
4975
5064
  }
4976
5065
  return React.createElement('svg', { width: size, height: size, viewBox: '0 0 16 16', fill: 'none', stroke: 'currentColor', strokeWidth: 1.25, strokeLinecap: 'round', strokeLinejoin: 'round', 'aria-hidden': true, className, style: { flexShrink: 0 } }, React.createElement('path', { d: paths[name] || paths.file }))
4977
5066
  }
@@ -5110,6 +5199,11 @@ window.__ModuleLoader__.load({
5110
5199
  const dataRef = React.useRef(data)
5111
5200
  const [err, setErr] = React.useState('')
5112
5201
  const [busy, setBusy] = React.useState('')
5202
+ // Issue #207: the local path of the last mirror download from the tree's
5203
+ // context menu — shown with a "show in folder" action, because the
5204
+ // download itself is invisible (no path picker is involved by design).
5205
+ const [dlNote, setDlNote] = React.useState(null)
5206
+ const revealDlNote = (p) => api('POST', '/dsh-remote/fs', withSessionBody({ op: 'revealLocal', path: p }, sessionId)).catch(() => { /* best-effort; the path is still shown */ })
5113
5207
  const [picker, setPicker] = React.useState(false)
5114
5208
  // Issue #180: the remote root the user EXPLICITLY picked in this panel.
5115
5209
  // It only ever overrides what this session's explorer shows — it is never
@@ -5307,6 +5401,7 @@ window.__ModuleLoader__.load({
5307
5401
  if (!m) return
5308
5402
  if (id === 'open') { if (m.isDir) { if (props.onToggleDir) props.onToggleDir(m.path) } else openFile(m.path); return }
5309
5403
  if (id === 'download') { doFs('download', { path: m.path }); return }
5404
+ if (id === 'download-client') { downloadToComputer(m.path); return }
5310
5405
  if (id === 'copy-rel') { copyPath(relPath(m.path), m.path); return }
5311
5406
  if (id === 'copy-abs') { copyPath(m.path, m.path); return }
5312
5407
  if (id === 'rename') { setNamePrompt({ kind: 'rename', path: m.path, name: m.name }); return }
@@ -5332,7 +5427,8 @@ window.__ModuleLoader__.load({
5332
5427
  return d
5333
5428
  }
5334
5429
  box.appendChild(mkItem(menu.isDir ? tr('explorer.menuExpand') : tr('explorer.menuOpen'), false, () => runMenuAction('open', menu)))
5335
- if (!localWorkspaceSession(sessionId)) box.appendChild(mkItem(tr('explorer.menuDownload'), false, () => runMenuAction('download', menu)))
5430
+ if (!menu.isDir) box.appendChild(mkItem(tr('explorer.menuDownloadLocal'), false, () => runMenuAction('download-client', menu)))
5431
+ if (!menu.isDir && !localWorkspaceSession(sessionId)) box.appendChild(mkItem(tr('explorer.menuDownload'), false, () => runMenuAction('download', menu)))
5336
5432
  box.appendChild(mkItem(tr('explorer.menuCopyRel'), false, () => runMenuAction('copy-rel', menu)))
5337
5433
  box.appendChild(mkItem(tr('explorer.menuCopyAbs'), false, () => runMenuAction('copy-abs', menu)))
5338
5434
  box.appendChild(mkItem(tr('explorer.menuRename'), false, () => runMenuAction('rename', menu)))
@@ -5392,9 +5488,13 @@ window.__ModuleLoader__.load({
5392
5488
  const view = viewRef.current
5393
5489
  setBusy(op)
5394
5490
  return api('POST', '/dsh-remote/fs', withSessionBody({ op, ...payload }, sessionId))
5395
- .then(() => {
5491
+ .then((r) => {
5396
5492
  if (viewRef.current !== view) return
5397
5493
  setErr('')
5494
+ // Issue #207: the explorer used to discard the download response —
5495
+ // the file landed in the local mirror with zero feedback, reading
5496
+ // as "the download did nothing".
5497
+ if (op === 'download' && r && r.local) setDlNote({ path: String(r.local) })
5398
5498
  if (refreshParent) {
5399
5499
  if (root) loadDir(root, { force: true })
5400
5500
  for (const dir of expanded) if (dir !== root) loadDir(dir, { force: true })
@@ -5440,6 +5540,12 @@ window.__ModuleLoader__.load({
5440
5540
  ? React.createElement('span', { style: { fontSize: 11, opacity: 0.75, flexShrink: 0, color: T.ok } }, tr('explorer.copied'))
5441
5541
  : null)
5442
5542
 
5543
+ // Fetch the file through the host and let the browser save it.
5544
+ const downloadToComputer = (p) => {
5545
+ setErr('')
5546
+ downloadRemoteFileToClient(sessionId, p).catch((e) => setErr(String((e && e.message) || e)))
5547
+ }
5548
+
5443
5549
  // One tree row (dir toggles via the framework's onToggleDir; file opens).
5444
5550
  // Text uses the normal foreground (theme-following) — no accent green.
5445
5551
  const treeKeyDown = (e) => {
@@ -5520,6 +5626,16 @@ window.__ModuleLoader__.load({
5520
5626
  React.createElement('span', { style: { flexShrink: 0, display: 'inline-flex' } }, IconFile(entry.name)),
5521
5627
  React.createElement('span', { style: { overflow: 'hidden', textOverflow: 'ellipsis', flex: 1 } }, entry.name),
5522
5628
  copiedMark(entry.path),
5629
+ hovered ? React.createElement('span', {
5630
+ className: 'dsh-rw-row-download',
5631
+ role: 'button',
5632
+ tabIndex: -1,
5633
+ title: tr('explorer.downloadLocal'),
5634
+ 'aria-label': tr('explorer.downloadLocal'),
5635
+ onClick: (e) => { e.preventDefault(); e.stopPropagation(); downloadToComputer(entry.path) },
5636
+ onKeyDown: (e) => { if (e.key === 'Enter' || e.key === ' ') { e.preventDefault(); e.stopPropagation(); downloadToComputer(entry.path) } },
5637
+ style: { flexShrink: 0, display: 'inline-flex', alignItems: 'center', color: T.muted, cursor: 'pointer', padding: '0 2px' },
5638
+ }, React.createElement(WorkbenchIcon, { name: 'download', size: 13 })) : null,
5523
5639
  (entry.size != null || entry.mtime)
5524
5640
  ? React.createElement('span', { className: 'dsh-rw-row-meta', style: { fontSize: 10, flexShrink: 0, fontFamily: 'monospace' }, title: entry.mtime ? fmtTime(entry.mtime) : '' }, humanSize(entry.size))
5525
5641
  : null,
@@ -5601,6 +5717,10 @@ window.__ModuleLoader__.load({
5601
5717
  connectionState === 'interrupted' && root ? React.createElement('div', { role: 'status', style: { padding: '6px 10px', display: 'flex', gap: 6, fontSize: 11, color: T.warn, background: T.bg } },
5602
5718
  React.createElement('span', { style: { flex: 1 } }, tr('explorer.connection.interrupted')),
5603
5719
  React.createElement('button', { type: 'button', className: 'dsh-rw-btn', style: buttonS, onClick: () => refreshStatus({ force: true }) }, tr('project.retry'))) : null,
5720
+ dlNote ? React.createElement('div', { role: 'status', style: { padding: '6px 10px', display: 'flex', gap: 6, fontSize: 11, alignItems: 'center', background: T.bg } },
5721
+ React.createElement('span', { style: { flex: 1, wordBreak: 'break-all' }, title: dlNote.path }, tr('explorer.downloadedNote', { path: dlNote.path })),
5722
+ React.createElement('button', { type: 'button', className: 'dsh-rw-btn', style: buttonS, onClick: () => revealDlNote(dlNote.path) }, tr('explorer.showInFolder')),
5723
+ React.createElement('button', { type: 'button', className: 'dsh-rw-btn', style: buttonS, onClick: () => setDlNote(null), 'aria-label': tr('explorer.dismissNote') }, '✕')) : null,
5604
5724
  remoteTerminal.error ? React.createElement('div', { role: 'alert', style: { padding: '6px 10px', color: T.danger, fontSize: 12 } }, remoteTerminal.error) : null,
5605
5725
  picker ? React.createElement('div', { style: { padding: 8 } }, React.createElement(DirPicker, {
5606
5726
  open: true, busy: false, registerWorkspace: false, initialTab: 'remote',
@@ -5658,7 +5778,8 @@ window.__ModuleLoader__.load({
5658
5778
  contextual: true,
5659
5779
  items: [
5660
5780
  { id: 'open', label: menu.isDir ? tr('explorer.menuExpand') : tr('explorer.menuOpen') },
5661
- ...(!localWorkspaceSession(sessionId) ? [{ id: 'download', label: tr('explorer.menuDownload') }] : []),
5781
+ ...(menu.isDir ? [] : [{ id: 'download-client', label: tr('explorer.menuDownloadLocal') }]),
5782
+ ...(!menu.isDir && !localWorkspaceSession(sessionId) ? [{ id: 'download', label: tr('explorer.menuDownload') }] : []),
5662
5783
  { id: 'copy-rel', label: tr('explorer.menuCopyRel') },
5663
5784
  { id: 'copy-abs', label: tr('explorer.menuCopyAbs') },
5664
5785
  { id: 'rename', label: tr('explorer.menuRename') },
@@ -6205,6 +6326,10 @@ window.__ModuleLoader__.load({
6205
6326
  const [findIndex, setFindIndex] = React.useState(0)
6206
6327
  const [cursor, setCursor] = React.useState({ line: 1, col: 1 })
6207
6328
  const [copyNote, setCopyNote] = React.useState('')
6329
+ // Issue #207: the local path of the last mirror download (shown with a
6330
+ // "show in folder" action; dismissible).
6331
+ const [dlLocal, setDlLocal] = React.useState('')
6332
+ const revealLocal = (p) => api('POST', '/dsh-remote/fs', withSessionBody({ op: 'revealLocal', path: p }, fileSessionId)).catch(() => { /* revealing is best-effort; the path is still shown */ })
6208
6333
  const scrollRef = React.useRef(null)
6209
6334
  const editorRef = React.useRef(null)
6210
6335
  const findRef = React.useRef(null)
@@ -6370,7 +6495,22 @@ window.__ModuleLoader__.load({
6370
6495
  const downloadMirror = () => {
6371
6496
  setSaving(true); setErr('')
6372
6497
  api('POST', '/dsh-remote/fs', withSessionBody({ op: 'download', path }, fileSessionId))
6373
- .then((r) => { if (fileViewRef.current === draftKey) setCopyNote(tr('file.downloaded', { local: (r && r.local ? tr('file.downloadedAt', { path: r.local }) : '') })) })
6498
+ .then((r) => {
6499
+ if (fileViewRef.current !== draftKey) return
6500
+ setCopyNote(tr('file.downloaded', { local: (r && r.local ? tr('file.downloadedAt', { path: r.local }) : '') }))
6501
+ // Issue #207: the file lands in the local mirror — make that
6502
+ // actionable instead of a transient note the user never connects
6503
+ // to a place on disk.
6504
+ setDlLocal(r && r.local ? String(r.local) : '')
6505
+ })
6506
+ .catch((e) => { if (fileViewRef.current === draftKey) setErr(String((e && e.message) || e)) })
6507
+ .finally(() => { if (fileViewRef.current === draftKey) setSaving(false) })
6508
+ }
6509
+
6510
+ const downloadToBrowser = () => {
6511
+ setSaving(true); setErr('')
6512
+ downloadRemoteFileToClient(fileSessionId, path)
6513
+ .then(() => { if (fileViewRef.current !== draftKey) return; setCopyNote(tr('file.downloadedToComputer')) })
6374
6514
  .catch((e) => { if (fileViewRef.current === draftKey) setErr(String((e && e.message) || e)) })
6375
6515
  .finally(() => { if (fileViewRef.current === draftKey) setSaving(false) })
6376
6516
  }
@@ -6421,6 +6561,7 @@ window.__ModuleLoader__.load({
6421
6561
  React.createElement(WorkbenchAction, { icon: 'search', label: tr('workbench.find'), pressed: findOpen, disabled: !data || data.binary || data.image, onClick: () => { setFindOpen((v) => !v); setSourceMode(true); keepView({ sourceMode: true }) } }),
6422
6562
  React.createElement(WorkbenchAction, { icon: 'wrap', label: tr('workbench.wrap'), pressed: wrap, onClick: () => { setWrap(!wrap); keepView({ wrap: !wrap }) } }),
6423
6563
  React.createElement(WorkbenchAction, { icon: 'copy', label: tr('workbench.copyContent'), disabled: !data || data.binary || data.image, onClick: () => copy(edit ? draft : originalText) }),
6564
+ React.createElement(WorkbenchAction, { icon: 'download', label: tr('file.download'), disabled: loading || saving || !path || !!localCopy, onClick: downloadToBrowser }),
6424
6565
  React.createElement(WorkbenchAction, { icon: 'terminal', label: tr('workbench.openTerminal'), disabled: remoteTerminal.pending, onClick: remoteTerminal.open }),
6425
6566
  edit ? React.createElement(React.Fragment, null,
6426
6567
  React.createElement('button', { type: 'button', className: 'dsh-rw-btn dsh-rw-primary', style: { ...primaryBtnS, padding: '4px 10px', fontSize: 12 }, onClick: saveRemote, disabled: saving || !dirty || saveConflict, title: tr('file.saveHint') }, saving ? tr('file.saving') : tr('file.saveToRemote')),
@@ -6516,7 +6657,10 @@ window.__ModuleLoader__.load({
6516
6657
  React.createElement('span', {}, data && data.size != null ? humanSize(data.size) : ''),
6517
6658
  React.createElement('span', {}, baseName.includes('.') ? baseName.split('.').pop().toUpperCase() : 'TEXT'),
6518
6659
  data?.eol ? React.createElement('span', {}, data.eol === 'crlf' ? 'CRLF' : data.eol === 'mixed' ? tr('file.mixedEol') : 'LF') : null,
6519
- React.createElement('span', { style: { marginLeft: 'auto', color: copyNote ? T.ok : T.muted } }, copyNote || (localPreview ? tr('file.localCopySource') : loading && data ? tr('workbench.refreshing') : edit ? tr('file.editing') : tr('file.readonly')))),
6660
+ React.createElement('span', { style: { marginLeft: 'auto', color: copyNote ? T.ok : T.muted } }, copyNote || (localPreview ? tr('file.localCopySource') : loading && data ? tr('workbench.refreshing') : edit ? tr('file.editing') : tr('file.readonly'))),
6661
+ dlLocal ? React.createElement('span', { style: { display: 'flex', gap: 6, alignItems: 'center' } },
6662
+ React.createElement('button', { type: 'button', className: 'dsh-rw-btn', onClick: () => revealLocal(dlLocal), title: dlLocal }, tr('explorer.showInFolder')),
6663
+ React.createElement('button', { type: 'button', className: 'dsh-rw-btn', onClick: () => setDlLocal(''), 'aria-label': tr('explorer.dismissNote') }, '✕')) : null),
6520
6664
  )
6521
6665
  }
6522
6666
 
package/lib/index.js CHANGED
@@ -15,6 +15,7 @@ export const win32FolderPickScript = main.win32FolderPickScript
15
15
  export const LOCAL_BOOTSTRAP_TOOLS = main.LOCAL_BOOTSTRAP_TOOLS
16
16
  export const normalizeLocalTools = main.normalizeLocalTools
17
17
  export const pickWorkspaceNextStep = main.pickWorkspaceNextStep
18
+ export const pickWorkspaceRebindNote = main.pickWorkspaceRebindNote
18
19
  export const inject = main.inject
19
20
  export const Config = main.Config
20
21
  export const apply = main.apply
package/lib/main.js CHANGED
@@ -151,6 +151,17 @@ export function pickWorkspaceNextStep(localSession) {
151
151
  : 'Run rw_sync to download its files into the local mirror.'
152
152
  }
153
153
 
154
+ /** Issue #205: the closing note when the picking session is ALREADY bound to a
155
+ * different workspace. rw_pick_workspace does not rebind the current session
156
+ * — a model that assumes "paths now resolve against the new pick" silently
157
+ * operates on the old workspace — so the success text must say so explicitly.
158
+ * The parallel-worktree flow (pick each worktree once, one session per
159
+ * mirror) is the documented answer. */
160
+ export function pickWorkspaceRebindNote(currentWs, pickedWs, display) {
161
+ if (!currentWs || currentWs === pickedWs) return null
162
+ return `NOTE: this session is still bound to ${display(currentWs)} — relative paths, rw_exec's working directory and rw_sync keep resolving against IT. To work inside the newly picked workspace, open a session whose workspace is the local mirror path above (for parallel git worktrees: pick each worktree once, one session per mirror), or pass absolute paths / an explicit cd in commands.`
163
+ }
164
+
154
165
  // Web and Desktop share the SSH tools; each optional UI transport is attached
155
166
  // reactively below, so service startup order does not drop the JSON routes.
156
167
  export const inject = ['tools', 'systemPrompt']
@@ -849,6 +860,9 @@ export async function apply(ctx, config) {
849
860
  // Issue #51: the backend is part of the target identity, so a machine switch
850
861
  // between backends must be seen as a change by setTarget.
851
862
  backend: c.backend, sshBinary: c.sshBinary,
863
+ // Issue #206: the per-machine shell is part of the target identity too —
864
+ // a switch that only changes it must reset the cached platform detection.
865
+ shell: c.shell,
852
866
  })
853
867
 
854
868
  /** Fingerprint of the machine record last applied to the shared pool config.
@@ -1844,7 +1858,7 @@ export async function apply(ctx, config) {
1844
1858
  const binding = await resolveRequestBinding(req, body, { allowLocal: local })
1845
1859
  if (local && !binding.local) throw Object.assign(new Error('Workspace execution context changed; reload before retrying'), { httpStatus: 409 })
1846
1860
  const route = new URL(req.url || '/', 'http://localhost').pathname
1847
- if (binding.local && ['/dsh-remote/ls', '/dsh-remote/read', '/dsh-remote/write', '/dsh-remote/fs'].includes(route)) {
1861
+ if (binding.local && ['/dsh-remote/ls', '/dsh-remote/read', '/dsh-remote/download', '/dsh-remote/write', '/dsh-remote/fs'].includes(route)) {
1848
1862
  for (const field of ['path', 'dest']) {
1849
1863
  const target = body[field] || q.get(field)
1850
1864
  if (target) await binding.pool.checkPath(String(target), { mutation: route === '/dsh-remote/write' || route === '/dsh-remote/fs' })
@@ -2259,6 +2273,7 @@ export async function apply(ctx, config) {
2259
2273
  hostKeyMode: { type: 'string', description: 'Host-key policy for this machine: ask | strict | off (default from config)' },
2260
2274
  backend: { type: 'string', description: 'SSH transport backend (issue #51): "native" (default) uses the built-in ssh2 client (password / private key / agent / keyboard-interactive); "openssh" drives the LOCAL ssh command, which is the only way to reach hosts that require GSSAPI/Kerberos (log in once with kinit) and which honours the whole of ~/.ssh/config (ProxyCommand, PKCS11Provider, Match blocks). Prefer "openssh" together with useSshConfig=true so the alias and its settings stay the single source of truth.' },
2261
2275
  sshBinary: { type: 'string', description: 'Path (or PATH name) of the ssh executable the "openssh" backend drives — default "ssh"' },
2276
+ shell: { type: 'string', description: 'Windows remotes: the bash.exe path (or a wrapper script) to use as the remote shell, overriding auto-detection (where bash) — e.g. when auto-detect finds the WSL launcher stub, or Git Bash needs a wrapper to survive sshd. Leave empty to auto-detect.' },
2262
2277
  name: { type: 'string', description: 'Display name for a newly saved machine (default: the host)' },
2263
2278
  useSshConfig: { type: 'boolean', description: 'Treat `host` as a ~/.ssh/config Host alias; resolve host/user/port/key/proxy from that file (issue #38)' },
2264
2279
  save: { type: 'boolean', description: 'Save this machine to the registry and make it current (default true)' },
@@ -2330,6 +2345,9 @@ export async function apply(ctx, config) {
2330
2345
  // handed to ssh verbatim so ~/.ssh/config stays the single source.
2331
2346
  if (args.backend) rec.backend = args.backend === 'openssh' ? 'openssh' : 'native'
2332
2347
  if (args.sshBinary !== undefined) rec.sshBinary = String(args.sshBinary)
2348
+ // Issue #206: the per-machine shell is settable at connect time too,
2349
+ // mirroring sshBinary (it is honored by both backends' detection).
2350
+ if (args.shell !== undefined) rec.shell = String(args.shell)
2333
2351
  // Issue #54: the per-machine `dsh web` command is settable by hand too,
2334
2352
  // not only by the deploy flow (the README told users to set it and the
2335
2353
  // settings UI offered nowhere to type it).
@@ -2388,6 +2406,7 @@ export async function apply(ctx, config) {
2388
2406
  proxy: ct.proxy,
2389
2407
  backend: backendFor(rec, config),
2390
2408
  sshBinary: rec.sshBinary !== undefined ? rec.sshBinary : config.sshBinary,
2409
+ shell: rec.shell !== undefined ? rec.shell : config.shell,
2391
2410
  workspace: config.workspace,
2392
2411
  })
2393
2412
  appliedMachineId = ephemeral.id || null
@@ -2490,7 +2509,7 @@ export async function apply(ctx, config) {
2490
2509
  defineTool({
2491
2510
  name: 'rw_pick_workspace',
2492
2511
  description:
2493
- 'Set the remote workspace directory this session should treat as its working root on the connected remote. Verifies it exists (a directory). Use rw_list_dir to browse first if unsure. Accepts POSIX (/home/dev/project) or Windows (C:\\Users\\dev\\project) paths.',
2512
+ 'Set the remote workspace directory for this machine: verifies it exists (a directory), creates its LOCAL MIRROR (auto-push starts watching the mirror), and records it as the machine\'s workspace. Use rw_list_dir to browse first if unsure. SCOPE (issue #205): this does NOT change the current session\'s working directory — a session already bound to another workspace keeps resolving relative paths, rw_exec\'s cwd and rw_sync against ITS OWN workspace until a session is opened inside the new mirror. For parallel git worktrees: pick each worktree once, then open one session per mirror; within a single session use absolute paths or an explicit cd. Accepts POSIX (/home/dev/project) or Windows (C:\\Users\\dev\\project) paths.',
2494
2513
  parameters: {
2495
2514
  path: { type: 'string', required: true, description: 'Absolute remote directory path, e.g. /home/dev/code/project or C:\\Users\\dev\\project' },
2496
2515
  },
@@ -2531,8 +2550,13 @@ export async function apply(ctx, config) {
2531
2550
  // The closing hint depends on where THIS session stands (issue #63):
2532
2551
  // in a LOCAL session "Run rw_sync" is a dead instruction — rw_sync
2533
2552
  // refuses a local session — so say the mirror must be OPENED first.
2553
+ // Issue #205: a session that picks a workspace DIFFERENT from its own
2554
+ // binding must be told the pick does not rebind it — the old text
2555
+ // ("Remote workspace set to …" + "Run rw_sync") read as "paths now
2556
+ // resolve against the new pick", which is not what happens.
2557
+ const rebindNote = pickWorkspaceRebindNote(b.ws, p, (x) => toDisplayPath(x, b.pool.platform))
2534
2558
  return {
2535
- text: `Remote workspace set to ${shown} on ${b.username}@${b.host}.\nLocal mirror (native workspace path): ${local}\n\n${pickWorkspaceNextStep(b.local)}`,
2559
+ text: `Remote workspace set to ${shown} on ${b.username}@${b.host}.\nLocal mirror (native workspace path): ${local}\n\n${rebindNote || pickWorkspaceNextStep(b.local)}`,
2536
2560
  }
2537
2561
  },
2538
2562
  }),
@@ -3772,6 +3796,12 @@ export async function apply(ctx, config) {
3772
3796
  const prev = i >= 0 ? machines[i] : null
3773
3797
  const credBackend = body.credentialBackend === 'plain' ? 'plain'
3774
3798
  : (body.encryptPassword ? platformBackend() : (prev && prev.credentialBackend ? prev.credentialBackend : 'plain'))
3799
+ // Issue #212: the per-machine plain-login terminal flag. An omitted flag
3800
+ // keeps the stored one (older clients, partial API updates); an explicit
3801
+ // boolean wins — including false, which clears it.
3802
+ const keepNoCommand = body.terminalNoCommand === undefined
3803
+ ? !!(prev && prev.terminalNoCommand)
3804
+ : !!body.terminalNoCommand
3775
3805
  const rec = {
3776
3806
  id,
3777
3807
  name: String(body.name || '').trim() || host,
@@ -3816,6 +3846,14 @@ export async function apply(ctx, config) {
3816
3846
  credentialBackend: prev && prev.credentialBackend,
3817
3847
  }, config),
3818
3848
  sshBinary: String(body.sshBinary || '').trim(),
3849
+ ...(keepNoCommand ? { terminalNoCommand: true } : {}),
3850
+ // Issue #206: the per-machine shell. A form that omits it (or an older
3851
+ // client) keeps the stored value — a rebuild that dropped the field used
3852
+ // to wipe a hand-edited shell on the next save (picking a workspace was
3853
+ // enough); an explicit '' clears it.
3854
+ shell: body.shell === undefined
3855
+ ? String((prev && prev.shell) || '')
3856
+ : String(body.shell || '').trim(),
3819
3857
  // Issue #54: the per-machine `dsh web` launch command was only
3820
3858
  // ever writable by the deploy flow or by hand-editing
3821
3859
  // machines.json — the README told users to set it and the
@@ -4516,6 +4554,7 @@ export async function apply(ctx, config) {
4516
4554
  ...createFsRoutes({
4517
4555
  sendJson, readBody, resolveRequestBinding: resolveWorkbenchBinding, decodeBuf, encodeText, audit, config, mirrorDirFor,
4518
4556
  onRemoteMutation: () => { if (remoteSkills) remoteSkills.invalidate() },
4557
+ openLocalPath, mirrorRoot: remoteWorkspacesRoot,
4519
4558
  }),
4520
4559
 
4521
4560
  // Embedded terminal (P1): one host-owned PTY session per machine, polled.
package/lib/openssh.js CHANGED
@@ -587,7 +587,7 @@ export class SystemOpenSshPool {
587
587
  return String(this.config.host || '')
588
588
  }
589
589
 
590
- setTarget({ host, port, username, password, privateKeyPath, passphrase, workspace, useAgent, keyboardInteractive, proxy, hostKeyMode, backend, sshBinary }, previous) {
590
+ setTarget({ host, port, username, password, privateKeyPath, passphrase, workspace, useAgent, keyboardInteractive, proxy, hostKeyMode, backend, sshBinary, shell }, previous) {
591
591
  const base = previous || this.config
592
592
  const wanted = []
593
593
  if (host !== undefined) wanted.push(['host', String(host)])
@@ -606,6 +606,9 @@ export class SystemOpenSshPool {
606
606
  // a field one of them diffs must not be silently ignored by the other.
607
607
  if (backend !== undefined) wanted.push(['backend', String(backend)])
608
608
  if (sshBinary !== undefined) wanted.push(['sshBinary', String(sshBinary)])
609
+ // Issue #206: kept in step with the native pool's setTarget (same contract
610
+ // as sshBinary above) — a shell change resets the cached detection.
611
+ if (shell !== undefined) wanted.push(['shell', String(shell)])
609
612
  const differs = ([k, v]) => (k === 'proxy'
610
613
  ? JSON.stringify(base[k] ?? null) !== JSON.stringify(v ?? null)
611
614
  : base[k] !== v)
package/lib/pool.js CHANGED
@@ -272,7 +272,7 @@ export class SshPool {
272
272
  return p
273
273
  }
274
274
 
275
- setTarget({ host, port, username, password, privateKeyPath, passphrase, workspace, useAgent, keyboardInteractive, proxy, hostKeyMode, backend, sshBinary }, previous) {
275
+ setTarget({ host, port, username, password, privateKeyPath, passphrase, workspace, useAgent, keyboardInteractive, proxy, hostKeyMode, backend, sshBinary, shell }, previous) {
276
276
  // Collect the requested changes first: an UNCHANGED target is a no-op. The
277
277
  // old behavior closed the live connection and re-ran platform detection
278
278
  // even for an identical target, so every picker keystroke
@@ -303,6 +303,10 @@ export class SshPool {
303
303
  // it must close the live connection exactly like changing the host does.
304
304
  if (backend !== undefined) wanted.push(['backend', String(backend)])
305
305
  if (sshBinary !== undefined) wanted.push(['sshBinary', String(sshBinary)])
306
+ // Issue #206: the shell participates in the target identity so a machine
307
+ // switch that only changes it still resets detection (gitBashPath/shellMode
308
+ // are cached per target and would otherwise outlive the switch).
309
+ if (shell !== undefined) wanted.push(['shell', String(shell)])
306
310
  const differs = ([k, v]) => (k === 'proxy'
307
311
  ? JSON.stringify(base[k] ?? null) !== JSON.stringify(v ?? null)
308
312
  : base[k] !== v)
@@ -456,6 +460,15 @@ export class SshPool {
456
460
  }
457
461
  this.client = client
458
462
  this._sftpTimeouts = 0
463
+ // Issue #211: ssh2 writes each SSH packet's length/payload/padding as
464
+ // separate socket writes; with Nagle on, every burst waits for the
465
+ // previous ACK (plus delayed-ACK) — on a 72ms WireGuard link that made
466
+ // every command take ~6x (measured: `echo ok` 370ms → 146ms). Called
467
+ // from 'ready' because the socket only exists once connected (an
468
+ // earlier call is a silent no-op on a null _sock). It is a no-op for
469
+ // non-socket transports (a proxied channel), and the system-OpenSSH
470
+ // backend runs its own `ssh`, which sets NODELAY itself.
471
+ if (typeof client.setNoDelay === 'function') { try { client.setNoDelay(true) } catch { /* best effort */ } }
459
472
  resolve(client)
460
473
  if (this.onReady) { try { this.onReady(client) } catch {} }
461
474
  })
package/lib/registry.js CHANGED
@@ -292,6 +292,10 @@ export function applyMachine(config, m) {
292
292
  // default.
293
293
  if (m.backend) config.backend = m.backend
294
294
  if (typeof m.sshBinary === 'string') config.sshBinary = m.sshBinary
295
+ // Issue #206: the per-machine `shell` (a bash.exe path or wrapper on Windows
296
+ // remotes) was declared in the schema and read by both backends' detection,
297
+ // but never copied here — a hand-edited value was dead on arrival.
298
+ if (typeof m.shell === 'string') config.shell = m.shell
295
299
  config.proxy = m.proxy && m.proxy.host ? m.proxy : undefined
296
300
  }
297
301
 
@@ -150,6 +150,7 @@ function isWindowsRemotePath(p) {
150
150
  *
151
151
  * @param {object} target - `{ host, port, username, alias, remotePath }`
152
152
  * @param {object} [machine] - saved connection, for the key and transport hints
153
+ * (`terminalNoCommand` — issue #212 — makes the launcher dial a plain login)
153
154
  * @returns {string[]}
154
155
  */
155
156
  function buildSshArgs(target, machine) {
@@ -169,7 +170,14 @@ function buildSshArgs(target, machine) {
169
170
  // default shell may be cmd or PowerShell, and picking one would be a guess.
170
171
  // Opening ssh with no command leaves the remote's own default shell in charge,
171
172
  // so the terminal still works; only the automatic `cd` is given up.
172
- if (!isWindowsRemotePath(target.remotePath)) args.push(remoteCommand(target.remotePath))
173
+ //
174
+ // Issue #212: the same no-command shape is available per machine for
175
+ // JumpServer-class gateways, which allocate a remote PTY only for a plain
176
+ // LOGIN — a session carrying a command comes up with no line discipline
177
+ // (no ICRNL, no ZLE: keys look dead, or a `script` wrapper doubles the
178
+ // terminal). A plain login gets a REAL pty from the gateway; the automatic
179
+ // `cd` is traded for a working terminal.
180
+ if (!isWindowsRemotePath(target.remotePath) && !(machine && machine.terminalNoCommand)) args.push(remoteCommand(target.remotePath))
173
181
  return args
174
182
  }
175
183
 
package/lib/routes-fs.js CHANGED
@@ -6,7 +6,7 @@
6
6
  // same mirror binding as rw_* tools and never fall back to the active machine.
7
7
  // URLSearchParams already decodes query paths. Another decoding pass corrupts
8
8
  // literal percent characters and names containing sequences such as `%2F`.
9
- import { mkdirSync } from 'node:fs'
9
+ import { mkdirSync, existsSync } from 'node:fs'
10
10
  import path from 'node:path'
11
11
  import { mirrorDownloadTarget, assertDownloadHasNoSymlinks } from './mirror-paths.js'
12
12
  export { mirrorDownloadTarget } from './mirror-paths.js'
@@ -18,6 +18,64 @@ import { requestSessionHint } from './binding.js'
18
18
  import { captureRemoteFile, atomicRemoteWrite, remoteRevision, missingRemoteFile } from './remote-write.js'
19
19
  import { listDirStructured, listRemoteDrives, removeRemoteTree, previewRemoteFile } from './remote-fs.js'
20
20
 
21
+ /**
22
+ * RFC 6266/5987 attachment header: an ASCII fallback plus the UTF-8 name, so a
23
+ * file called `报告 2026.pdf` keeps its name in every browser while a quote or a
24
+ * CR/LF inside the path can never break out of the header.
25
+ */
26
+ function contentDisposition(name) {
27
+ const raw = String(name || 'download')
28
+ const ascii = raw.replace(/[^\x20-\x7e]/g, '_').replace(/["\\]/g, '_')
29
+ const encoded = encodeURIComponent(raw).replace(/['()*]/g, (c) => '%' + c.charCodeAt(0).toString(16).toUpperCase())
30
+ return `attachment; filename="${ascii}"; filename*=UTF-8''${encoded}`
31
+ }
32
+
33
+ /** Resolve once the response can take more bytes, or reject when the client left. */
34
+ function responseDrained(res) {
35
+ return new Promise((resolve, reject) => {
36
+ const done = (err) => {
37
+ res.removeListener('drain', ok)
38
+ res.removeListener('close', closed)
39
+ res.removeListener('error', fail)
40
+ if (err) reject(err)
41
+ else resolve()
42
+ }
43
+ const ok = () => done()
44
+ const closed = () => done(Object.assign(new Error('download aborted by the client'), { code: 'CLIENT_GONE' }))
45
+ const fail = (err) => done(err)
46
+ res.once('drain', ok)
47
+ res.once('close', closed)
48
+ res.once('error', fail)
49
+ })
50
+ }
51
+
52
+ /**
53
+ * Copy a remote (or local-workspace) file into the HTTP response.
54
+ *
55
+ * The SFTP surface exposes no read stream, and buffering the file would hold up
56
+ * to `maxFileBytes` in the host's memory per click, so read and write in 1 MiB
57
+ * steps and honour backpressure.
58
+ */
59
+ async function streamFileToResponse(sftp, remotePath, size, res) {
60
+ const CHUNK = 1024 * 1024
61
+ if (typeof sftp.readPartial !== 'function') {
62
+ // Surface without bounded reads (tests, older adapters): one full read is
63
+ // still better than fastGet, which would park the bytes on the host's disk.
64
+ const buf = await sftp.readFile(remotePath)
65
+ if (buf && buf.length) res.write(buf)
66
+ res.end()
67
+ return
68
+ }
69
+ let offset = 0
70
+ while (offset < size) {
71
+ const buf = await sftp.readPartial(remotePath, offset, Math.min(CHUNK, size - offset))
72
+ if (!buf || !buf.length) break
73
+ offset += buf.length
74
+ if (!res.write(buf)) await responseDrained(res)
75
+ }
76
+ res.end()
77
+ }
78
+
21
79
  export function createFsRoutes({
22
80
  sendJson,
23
81
  readBody,
@@ -28,6 +86,8 @@ export function createFsRoutes({
28
86
  config,
29
87
  mirrorDirFor,
30
88
  onRemoteMutation = () => {},
89
+ openLocalPath,
90
+ mirrorRoot,
31
91
  }) {
32
92
  const bindOrReply = async (req, res, body = {}) => {
33
93
  try {
@@ -119,6 +179,62 @@ export function createFsRoutes({
119
179
  }
120
180
  },
121
181
  },
182
+ {
183
+ // Bytes for the machine running the BROWSER, not for the harness host.
184
+ //
185
+ // `fs op=download` writes the file into the DSH host's local mirror, which
186
+ // is the wrong machine as soon as the page is opened from another desktop:
187
+ // the file lands next to the harness and the browser is handed a path. This
188
+ // route answers the bytes themselves — GET, so the browser's own download
189
+ // manager owns progress, resume and cancel.
190
+ //
191
+ // The binding is the usual session one (query `sessionId`, plus
192
+ // `workspace=local` for a local workspace) and resolveWorkbenchBinding
193
+ // fences this route like /read, so a click in one session's explorer can
194
+ // never pull a file from another session's host, nor read outside a local
195
+ // workspace's root.
196
+ kind: 'exact',
197
+ path: '/dsh-remote/download',
198
+ handler: async (req, res) => {
199
+ if (req.method !== 'GET') return sendJson(res, 405, { ok: false, error: 'method not allowed' })
200
+ let streaming = false
201
+ try {
202
+ const q = new URL(req.url, 'http://localhost').searchParams
203
+ const requested = q.get('path') || ''
204
+ if (!requested) return sendJson(res, 400, { ok: false, error: 'path is required' })
205
+ const b = await bindOrReply(req, res, {})
206
+ if (!b) return
207
+ const p = normalizeRemotePath(requested)
208
+ if (!p || p === '/') return sendJson(res, 400, { ok: false, error: 'path is required' })
209
+ const sftp = await b.pool.sftp()
210
+ const st = await sftp.stat(p).catch((error) => {
211
+ if (missingRemoteFile(error)) return null
212
+ throw error
213
+ })
214
+ if (!st) return sendJson(res, 404, { ok: false, error: 'not found' })
215
+ if (st.isDirectory?.()) return sendJson(res, 400, { ok: false, error: 'download requires a file' })
216
+ const size = Number(st.size) || 0
217
+ if (config.maxFileBytes > 0 && size > config.maxFileBytes) {
218
+ return sendJson(res, 400, { ok: false, error: `file is ${size} bytes (over ${config.maxFileBytes} cap)` })
219
+ }
220
+ const name = String(p).split(/[\\/]/).filter(Boolean).pop() || 'download'
221
+ res.statusCode = 200
222
+ res.setHeader('Content-Type', 'application/octet-stream')
223
+ res.setHeader('Content-Disposition', contentDisposition(name))
224
+ res.setHeader('Content-Length', String(size))
225
+ res.setHeader('Cache-Control', 'no-store')
226
+ // Read by the UI to name the saved file: Content-Disposition parsing
227
+ // differs per browser, a plain field does not.
228
+ res.setHeader('X-Dsh-Download-Name', encodeURIComponent(name))
229
+ if (!b.local) audit('download', `download ${p} (to browser)`, 0, b)
230
+ streaming = true
231
+ await streamFileToResponse(sftp, p, size, res)
232
+ } catch (err) {
233
+ if (streaming) { try { res.destroy(err) } catch { /* already gone */ } return }
234
+ return sendJson(res, err.httpStatus || 500, { ok: false, error: String((err && err.message) || err) })
235
+ }
236
+ },
237
+ },
122
238
  {
123
239
  kind: 'exact',
124
240
  path: '/dsh-remote/read',
@@ -208,6 +324,26 @@ export function createFsRoutes({
208
324
  const b = await bindOrReply(req, res, body)
209
325
  if (!b) return
210
326
  if (b.local && op === 'download') return sendJson(res, 400, { ok: false, error: 'Local files are already on this host; no mirror download is needed' })
327
+ if (op === 'revealLocal') {
328
+ // Issue #207: "download to local mirror" used to end in a file the
329
+ // user could not find — no path picker is involved by design, and
330
+ // the explorer discarded the response entirely. The UI now offers
331
+ // "show in folder", backed by this op. The target is ALWAYS fenced
332
+ // to the plugin's own mirror tree; arbitrary local paths are
333
+ // refused (this is not a file launcher).
334
+ if (typeof openLocalPath !== 'function' || typeof mirrorRoot !== 'function') {
335
+ return sendJson(res, 501, { ok: false, error: 'reveal is not available on this host' })
336
+ }
337
+ const resolved = path.resolve(String(body.path || ''))
338
+ const rootDir = path.resolve(mirrorRoot())
339
+ if (!resolved.startsWith(rootDir + path.sep)) {
340
+ return sendJson(res, 400, { ok: false, error: 'revealLocal only accepts paths inside the local mirror tree' })
341
+ }
342
+ if (!existsSync(resolved)) return sendJson(res, 404, { ok: false, error: 'not found' })
343
+ const r = await openLocalPath(resolved, 'reveal')
344
+ if (!r.ok) return sendJson(res, r.httpStatus || 500, { ok: false, error: r.error, path: resolved })
345
+ return sendJson(res, 200, { ok: true, path: resolved, how: r.how })
346
+ }
211
347
  const sftp = await b.pool.sftp()
212
348
  if (op === 'mkdir') {
213
349
  const p = normalizeRemotePath(String(body.path || ''))
@@ -8,7 +8,7 @@
8
8
  import { existsSync, mkdirSync, writeFileSync, readFileSync, renameSync, rmSync, statSync, chmodSync, realpathSync, lstatSync } from 'node:fs'
9
9
  import { createHash, randomUUID } from 'node:crypto'
10
10
  import path from 'node:path'
11
- import { listAliases, sshConfigPath, readSshConfigText } from './sshconfig.js'
11
+ import { listAliases, sshConfigPath, readSshConfigText, sshAliasTarget } from './sshconfig.js'
12
12
 
13
13
  /**
14
14
  * @param {object} deps
@@ -67,6 +67,16 @@ export function createMachineRoutes({ sendJson, readBody, parseJsonObject, store
67
67
  })
68
68
  }
69
69
  const existing = machines.find((m) => m.useSshConfig && String(m.host) === alias)
70
+ // Issue #211: an alias whose Host block carries an IdentityFile
71
+ // (and nothing native cannot honor, like a jump host) can go on
72
+ // the native backend — one persistent connection instead of a
73
+ // `ssh` spawn per command, which costs a full TCP+SSH handshake
74
+ // every time (6x per-command latency on a 72ms link). Only a Host
75
+ // block with no key for ssh2 (agent/keychain/GSSAPI territory)
76
+ // still needs the system `ssh`.
77
+ const aliasTarget = sshAliasTarget(alias, { text: sshConfigText() })
78
+ const aliasKeyPath = (aliasTarget && aliasTarget.privateKeyPath) || ''
79
+ const aliasNeedsSsh = !aliasKeyPath || !!(aliasTarget && aliasTarget.proxy)
70
80
  let rec = existing
71
81
  if (!rec) {
72
82
  rec = {
@@ -77,18 +87,16 @@ export function createMachineRoutes({ sendJson, readBody, parseJsonObject, store
77
87
  port: Number(known.port) || 22,
78
88
  username: String(known.user || ''),
79
89
  password: '',
80
- privateKeyPath: '',
90
+ // A snapshot of the file's IdentityFile for the backend
91
+ // decision; the file itself stays the source of truth at dial
92
+ // time (withSshConfig re-resolves on every connect).
93
+ privateKeyPath: aliasKeyPath,
81
94
  passphrase: '',
82
95
  workspace: '',
83
96
  hostKeyMode: '',
84
97
  useAgent: false,
85
98
  keyboardInteractive: false,
86
- // ~/.ssh/config defines this machine, and the user's own `ssh`
87
- // is what interprets that file (default identity discovery,
88
- // agent/keychain, ProxyJump, GSSAPI). Native cannot see any of
89
- // it, so a Host block with no IdentityFile would be reported as
90
- // "no credentials".
91
- backend: 'openssh',
99
+ backend: aliasNeedsSsh ? 'openssh' : 'native',
92
100
  sshBinary: '',
93
101
  credentialBackend: 'plain',
94
102
  recentWorkspaces: [],
package/lib/web-attach.js CHANGED
@@ -294,9 +294,11 @@ export class WebAttach {
294
294
  this.localPortMax = opts.localPortMax ?? 50
295
295
  /** Whether the pool's lifecycle hooks are ours to install. */
296
296
  this.trackPool = opts.trackPool !== false
297
- /** Issue #125 discovery budgets (injectable so tests need not wait 8s). */
297
+ /** Issue #204: discover budgets (injectable so tests need not wait 8s). */
298
298
  this.discoverTimeoutMs = opts.discoverTimeoutMs ?? DISCOVER_TIMEOUT_MS
299
299
  this.probeTimeoutMs = opts.probeTimeoutMs ?? PROBE_TIMEOUT_MS
300
+ /** Issue #204: the reconnect backoff base (tests inject single-digit ms). */
301
+ this.reconnectBaseDelayMs = opts.reconnectBaseDelayMs ?? 1000
300
302
  /** @type {import('node:net').Server|null} */ this.server = null
301
303
  /** @type {Set<import('node:net').Socket>} */ this.sockets = new Set()
302
304
  /** @type {object|null} */ this.client = null
@@ -333,6 +335,10 @@ export class WebAttach {
333
335
  this.omittedNoOpen = false
334
336
  /** True while a reconnect-triggered re-resolve is in flight. */
335
337
  this._resolving = false
338
+ /** Issue #204: the reconnect-backoff loop's pending timer (null = idle). */
339
+ this._reconnectTimer = null
340
+ /** Issue #204: the current backoff delay (0 = fresh / reset). */
341
+ this._reconnectDelayMs = 0
336
342
  /** True once the borrowed connection has been lost (drives recovery). */
337
343
  this.connectionLost = false
338
344
  /** undefined = "not asked yet"; false = the remote process is provably gone. */
@@ -683,6 +689,9 @@ export class WebAttach {
683
689
  */
684
690
  _attach(client) {
685
691
  if (!client) return
692
+ // A client is (back) in hand: the issue #204 reconnect loop has done its
693
+ // job (or was never needed) — stop it and reset the backoff.
694
+ this._stopReconnectLoop()
686
695
  if (this.attachedClient && this.attachedClient !== client && this.onClientClose) {
687
696
  // A different client replaced the one we borrowed (pool reconnect). Stop
688
697
  // listening to the old one; its own 'close' has either fired already or
@@ -703,6 +712,40 @@ export class WebAttach {
703
712
  this.client = null
704
713
  this.connectionLost = true
705
714
  this.lastError = String(reason || 'ssh connection closed')
715
+ // Issue #204: without a driver the recovery machinery below never ran —
716
+ // the pool only reconnects when someone CALLS it, so an idle attach stayed
717
+ // a permanent dead end (listener up, every connection RST-ed) until the
718
+ // user manually disconnected.
719
+ this._scheduleReconnect()
720
+ }
721
+
722
+ /**
723
+ * Issue #204: dial the pool with a growing backoff until a client comes
724
+ * back. `pool.connect` memoizes an in-flight dial, so this loop and any
725
+ * other pool activity share one connection attempt; when one succeeds the
726
+ * pool fires onReady, whose hook re-attaches the client and kicks the
727
+ * (existing) re-resolve/restart of the remote `dsh web`. The loop stops on
728
+ * success, on close(), or when the pool goes away.
729
+ */
730
+ _scheduleReconnect() {
731
+ if (this.closed || !this.trackPool || !this.pool || typeof this.pool.connect !== 'function') return
732
+ if (this._reconnectTimer) return
733
+ const attempt = async () => {
734
+ this._reconnectTimer = null
735
+ if (this.closed || !this.pool || this.client) return
736
+ try { await this.pool.connect() } catch { /* link still down — back off and retry */ }
737
+ if (this.closed || !this.pool) return
738
+ if (this.client) { this._reconnectDelayMs = 0; return }
739
+ this._reconnectDelayMs = Math.min(this._reconnectDelayMs * 2 || this.reconnectBaseDelayMs, 30000)
740
+ this._reconnectTimer = setTimeout(attempt, this._reconnectDelayMs)
741
+ }
742
+ this._reconnectTimer = setTimeout(attempt, 0)
743
+ }
744
+
745
+ /** Stop the issue #204 reconnect loop (success, teardown, or pool change). */
746
+ _stopReconnectLoop() {
747
+ if (this._reconnectTimer) { clearTimeout(this._reconnectTimer); this._reconnectTimer = null }
748
+ this._reconnectDelayMs = 0
706
749
  }
707
750
 
708
751
  /**
@@ -1052,7 +1095,9 @@ export class WebAttach {
1052
1095
  */
1053
1096
  async close({ stopRemote = false, exec } = {}) {
1054
1097
  // Stop following the pool BEFORE any await: a reconnect landing mid-teardown
1055
- // must not re-arm the tunnel this call is in the middle of closing.
1098
+ // must not re-arm the tunnel this call is in the middle of closing. The
1099
+ // reconnect loop (issue #204) dies with the same stroke.
1100
+ this._stopReconnectLoop()
1056
1101
  this._detachPool()
1057
1102
  if (this.attachedClient && this.onClientClose) {
1058
1103
  try { this.attachedClient.removeListener('close', this.onClientClose) } catch { /* already gone */ }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "dsh-remote",
3
- "version": "1.4.1",
3
+ "version": "1.5.0",
4
4
  "description": "SSH remote workspaces for DeepSeek Harness: parallel projects across hosts, remote file browsing and editing, recursive search, terminals, Git diffs, and workspace-bound Agent tools to edit, build and test remotely. Optional IDE layout.",
5
5
  "license": "MIT",
6
6
  "author": "flymysql <flyphp@outlook.com>",
@@ -103,6 +103,6 @@
103
103
  "test:coverage": "node scripts/coverage-union.mjs",
104
104
  "test:coverage:gate": "node scripts/coverage-union.mjs --gate 70 --file-gate 60"
105
105
  },
106
- "readme": "[English](https://github.com/flymysql/dsh-remote/blob/main/README.en.md) · **中文**\n\n# dsh-remote\n\n[![npm version](https://img.shields.io/npm/v/dsh-remote)](https://www.npmjs.com/package/dsh-remote)\n[![downloads](https://img.shields.io/npm/dw/dsh-remote)](https://www.npmjs.com/package/dsh-remote)\n[![downloads](https://img.shields.io/npm/dm/dsh-remote)](https://www.npmjs.com/package/dsh-remote)\n[![license](https://img.shields.io/github/license/flymysql/dsh-remote)](https://github.com/flymysql/dsh-remote/blob/main/LICENSE)\n[![dsh-plugin](https://img.shields.io/badge/topic-dsh--plugin-7a3ef3)](https://github.com/topics/dsh-plugin)\n\n由 [@flymysql](https://github.com/flymysql) 维护 · [主页](https://flymysql.github.io/dsh-remote/) · [用量统计](https://flymysql.github.io/dsh-remote/stats/) · [博客](https://gitpull.cn) · [讨论区](https://github.com/flymysql/dsh-remote/discussions) · [Issue](https://github.com/flymysql/dsh-remote/issues) · [English](https://github.com/flymysql/dsh-remote/blob/main/README.en.md)\n\n![dsh-remote —— 远程项目,完整上下文](https://raw.githubusercontent.com/flymysql/dsh-remote/main/docs/shots/workspace-overview.png)\n\n在 [DeepSeek Harness](https://github.com/deepseek-ai/deepseek-harness) 中,把 SSH 主机变成日常开发工作区:管理多主机项目,浏览和编辑远程文件、递归搜索文件与内容、使用终端、查看 Git 差异、建立本地/反向端口隧道;让 Agent 在所属远程工作区中读写文件、执行命令、构建和测试。多个工作区可独立并行。\n\n可按习惯使用普通布局,或切换 **IDE 三栏布局**,并排查看远程文件、编辑器与原生 Agent 会话;切换时保留任务和未保存编辑。\n\n<img src=\"https://raw.githubusercontent.com/flymysql/dsh-remote/main/docs/shots/workbench-ide.png\" alt=\"DSH 远程工作区 IDE 模式:远程文件树、代码编辑器和原生 Agent 会话三栏\" width=\"1200\"/>\n\n## 安装\n\n```bash\ndsh plugin --profile web add dsh-remote\n```\n\n安装或升级后,重启 DSH Web 并刷新页面。自动更新状态在设置 → 远程工作区 → 插件偏好中查看。\n\n[1.4.1 更新说明](https://github.com/flymysql/dsh-remote/blob/main/docs/release/1.4.1.md):Windows OpenSSH 连接与平台探测修复、IDE 模式壁纸主题底板加固。\n\n## 3 步开始\n\n1. **配置主机**:设置 → 远程工作区,编辑 SSH 配置或保存主机凭据;直接写在 `~/.ssh/config` 里的 Host 会出现在主机列表中,点该行的「…」菜单 →「编辑」即可保存成机器并填写登录密码(保存前后入口都是同一个「…」菜单)。打开设置会自动检查连通性,无需手动“连接”。\n2. **创建工作区**:添加工作区 → 远程,选择主机与目录。每个工作区独立绑定主机,设置页不选目录或“当前远程机”。\n3. **开始开发**:打开工作区文件或切换 IDE 模式,文件打开即可编辑并显示语法高亮,在远端搜索、运行命令并与 Agent 协作。\n\n<img src=\"https://raw.githubusercontent.com/flymysql/dsh-remote/main/docs/shots/workspace-picker-browse.png\" alt=\"选择远程目录:固定路径与确认栏,目录列表占据弹窗主要区域\" width=\"720\"/>\n\n## 本地工作区也能用\n\n打开普通本地项目后,点击 **IDE 模式** 或 **工作区文件**,即可使用同一套文件树、高亮编辑、递归搜索、Git 差异与本地终端。无需配置 SSH;Agent 继续使用宿主原生文件和命令工具,多个本地、远程项目可并行工作。\n\n<img src=\"https://raw.githubusercontent.com/flymysql/dsh-remote/main/docs/shots/workbench-local.png\" alt=\"本地工作区:文件搜索、高亮编辑和原生 Agent 会话,Agent 已实际完成本地构建\" width=\"1200\"/>\n\n## 日常开发\n\n### 搜索远端文件与内容\n\n文件、目录和内容递归搜索,无需先展开目录或同步镜像。默认界面只显示搜索范围与进度摘要;按需展开搜索选项、扫描详情,支持大小写、忽略项、停止与重试。点击结果进入目录或文件对应行。\n\n<img src=\"https://raw.githubusercontent.com/flymysql/dsh-remote/main/docs/shots/workbench-search-results.png\" alt=\"简洁远程搜索:名称搜索结果包含嵌套目录与文件\" width=\"675\"/>\n\n### 查看远端 Git 改动\n\n分别查看工作区和已暂存 diff,筛选文件,点击改动行定位源码。面板只读,不提交或修改暂存区。\n\n<img src=\"https://raw.githubusercontent.com/flymysql/dsh-remote/main/docs/shots/workbench-git.png\" alt=\"远端 Git 工作区与已暂存改动、文件列表和源码 diff\" width=\"675\"/>\n\n### 在远端运行终端\n\n终端进入当前会话的远程目录;像素鱼欢迎图后接真实 SSH shell。已保存凭据可自动应答,支持多终端并行。\n\n<img src=\"https://raw.githubusercontent.com/flymysql/dsh-remote/main/docs/shots/workbench-terminal.png\" alt=\"DSH 远程终端:像素鱼欢迎图与实际 SSH 命令输出\" width=\"1000\"/>\n\n### 端口转发(SSH 隧道)\n\n谁要发起访问,就在谁那边开监听口:监听口开在本机是本地转发(`ssh -L`),开在远端是远程转发(`ssh -R`)。可同时运行多条;添加转发时可以选择「主机」,每条转发只属于一台机器——给还没连接的主机也能先存下转发,连上后再启动。每条转发都可以点「编辑」调整方向、端口、目标或所属主机,运行中的会先停止、保存后按新配置重新启动。每行能直接勾选「自动重连」——只恢复上次运行中的转发,且按机器隔离,反向转发首次勾选会提示远端监听风险。\n\n从旧版本升级:旧版没有 `lastActive` 的「自动重连」配置会暂停,行上显示「需重新确认」;重新勾选后才会参与自动恢复(反向转发需重新确认远端监听)。\n\n<img src=\"docs/shots/port-forwards.png\" alt=\"端口转发面板:本地/反向方向、自动重连勾选框与添加转发表单\" width=\"900\"/>\n\n### 与 Agent 一起修改和构建\n\n工具卡展示已应用改动、实际退出码和构建输出,编译诊断可跳转源码。编辑器保存会检测远端冲突、保留 CRLF,并保护保存期间继续输入的内容。\n\n<img src=\"https://raw.githubusercontent.com/flymysql/dsh-remote/main/docs/shots/workbench-applied-diff.png\" alt=\"Agent 远程编辑成功后的已应用 diff、路径与增删行数\" width=\"485\"/>\n\n## 兼容与边界\n\n- 主要面向 **DSH Web 0.2.x**;0.2.2 需要 **Node.js ≥24.9**。旧版宿主回退、Desktop/TUI 与 Agent diff 差异见[兼容说明](https://github.com/flymysql/dsh-remote/blob/main/docs/reference.zh.md#dsh-版本兼容性)。\n- 文件栏直接访问远端;镜像按需同步。草稿在当前页面内存,崩溃或强制退出仍可能丢失。\n- 不提供远端语言服务、扩展宿主或调试器。Agent 使用配置的 SSH 身份执行命令,请只配置可信主机。\n\n## 文档与社区\n\n[完整工具与配置参考](https://github.com/flymysql/dsh-remote/blob/main/docs/reference.zh.md) · [排障](https://github.com/flymysql/dsh-remote/blob/main/docs/troubleshooting.md) · [自更新修复](https://github.com/flymysql/dsh-remote/blob/main/docs/self-heal.md) · [升级指南](https://github.com/flymysql/dsh-remote/blob/main/docs/migration-1.0.md) · [更新记录](https://github.com/flymysql/dsh-remote/blob/main/CHANGELOG.md)\n\n[主页](https://flymysql.github.io/dsh-remote/) · [讨论区](https://github.com/flymysql/dsh-remote/discussions) · [反馈问题](https://github.com/flymysql/dsh-remote/issues) · [贡献指南](https://github.com/flymysql/dsh-remote/blob/main/CONTRIBUTING.md) · [贡献者与致谢](#贡献者与致谢)\n\n由 [@flymysql](https://github.com/flymysql) 与社区共同维护 · [MIT](https://github.com/flymysql/dsh-remote/blob/main/LICENSE)\n\n### 贡献者与致谢\n\n感谢每一位让这个项目更好的朋友(头像可点进主页;按提交数排序,机器人不计):\n\n<p align=\"left\">\n <a href=\"https://github.com/flymysql\"><img src=\"https://avatars.githubusercontent.com/u/37113068?s=80&v=4\" width=\"40\" height=\"40\" alt=\"@flymysql\" title=\"@flymysql\" /></a>\n <a href=\"https://github.com/baiseraku\"><img src=\"https://avatars.githubusercontent.com/u/139727690?s=80&v=4\" width=\"40\" height=\"40\" alt=\"@baiseraku\" title=\"@baiseraku\" /></a>\n <a href=\"https://github.com/glzhangzhi\"><img src=\"https://avatars.githubusercontent.com/u/36995275?s=80&v=4\" width=\"40\" height=\"40\" alt=\"@glzhangzhi\" title=\"@glzhangzhi\" /></a>\n <a href=\"https://github.com/hjwsm1989\"><img src=\"https://avatars.githubusercontent.com/u/1067541?s=80&v=4\" width=\"40\" height=\"40\" alt=\"@hjwsm1989\" title=\"@hjwsm1989\" /></a>\n <a href=\"https://github.com/j10ha0\"><img src=\"https://avatars.githubusercontent.com/u/72346906?s=80&v=4\" width=\"40\" height=\"40\" alt=\"@j10ha0\" title=\"@j10ha0\" /></a>\n <a href=\"https://github.com/FoolishWiser\"><img src=\"https://avatars.githubusercontent.com/u/104308087?s=80&v=4\" width=\"40\" height=\"40\" alt=\"@FoolishWiser\" title=\"@FoolishWiser\" /></a>\n <a href=\"https://github.com/kakaa-nju\"><img src=\"https://avatars.githubusercontent.com/u/79886619?s=80&v=4\" width=\"40\" height=\"40\" alt=\"@kakaa-nju\" title=\"@kakaa-nju\" /></a>\n <a href=\"https://github.com/4FMTWRV\"><img src=\"https://avatars.githubusercontent.com/u/190457700?s=80&v=4\" width=\"40\" height=\"40\" alt=\"@4FMTWRV\" title=\"@4FMTWRV\" /></a>\n <a href=\"https://github.com/dahaipeng\"><img src=\"https://avatars.githubusercontent.com/u/25660610?s=80&v=4\" width=\"40\" height=\"40\" alt=\"@dahaipeng\" title=\"@dahaipeng\" /></a>\n <a href=\"https://github.com/davidlin2k\"><img src=\"https://avatars.githubusercontent.com/u/17074619?s=80&v=4\" width=\"40\" height=\"40\" alt=\"@davidlin2k\" title=\"@davidlin2k\" /></a>\n <a href=\"https://github.com/FlintyLemming\"><img src=\"https://avatars.githubusercontent.com/u/19165511?s=80&v=4\" width=\"40\" height=\"40\" alt=\"@FlintyLemming\" title=\"@FlintyLemming\" /></a>\n <a href=\"https://github.com/GDWhisper\"><img src=\"https://avatars.githubusercontent.com/u/129148123?s=80&v=4\" width=\"40\" height=\"40\" alt=\"@GDWhisper\" title=\"@GDWhisper\" /></a>\n <a href=\"https://github.com/YiHui-Liu\"><img src=\"https://avatars.githubusercontent.com/u/30190271?s=80&v=4\" width=\"40\" height=\"40\" alt=\"@YiHui-Liu\" title=\"@YiHui-Liu\" /></a>\n <a href=\"https://github.com/Minggle\"><img src=\"https://avatars.githubusercontent.com/u/35053182?s=80&v=4\" width=\"40\" height=\"40\" alt=\"@Minggle\" title=\"@Minggle\" /></a>\n <a href=\"https://github.com/nekomona\"><img src=\"https://avatars.githubusercontent.com/u/25474483?s=80&v=4\" width=\"40\" height=\"40\" alt=\"@nekomona\" title=\"@nekomona\" /></a>\n <a href=\"https://github.com/shis23\"><img src=\"https://avatars.githubusercontent.com/u/189869650?s=80&v=4\" width=\"40\" height=\"40\" alt=\"@shis23\" title=\"@shis23\" /></a>\n</p>\n\n<details>\n<summary>贡献记录与早期贡献者</summary>\n\n近期的亮点贡献(欢迎随时加入这个名单):\n\n| 贡献者 | 做了什么 |\n| --- | --- |\n| [@baiseraku](https://github.com/baiseraku) | 整个 dsh-tui 适配层([#92](https://github.com/flymysql/dsh-remote/pull/92))+ 底栏机器名修正([#98](https://github.com/flymysql/dsh-remote/pull/98)) |\n| [@hjwsm1989](https://github.com/hjwsm1989) | 远程 .md 渲染连环两道:memo 守卫([#102](https://github.com/flymysql/dsh-remote/pull/102))+ labels 契约([#107](https://github.com/flymysql/dsh-remote/pull/107)) |\n| [@shis23](https://github.com/shis23) | rw_sync 路径映射纠偏 + SFTP 超时韧性([#105](https://github.com/flymysql/dsh-remote/pull/105)) |\n| [@davidlin2k](https://github.com/davidlin2k) | 无凭据机器走用户自有 ssh([#100](https://github.com/flymysql/dsh-remote/pull/100)) |\n| [@GDWhisper](https://github.com/GDWhisper) | 目录补全逐字符重连修复([#42](https://github.com/flymysql/dsh-remote/pull/42),issue #41) |\n| [@glzhangzhi](https://github.com/glzhangzhi) | 多远端会话的连接池隔离(issue #25 的主体修复) |\n\n早期已合并 PR 的贡献者(考古名单):\n\n\n\n[@dahaipeng](https://github.com/dahaipeng) (#31) ·\n[@YiHui-Liu](https://github.com/YiHui-Liu) (#28) ·\n[@nekomona](https://github.com/nekomona) (#24) ·\n[@zhz1667](https://github.com/zhz1667) (#43) ·\n[FoolishWiser](https://github.com/FoolishWiser) (#17) ·\n[@jace1cch](https://github.com/jace1cch) (#16) ·\n[@Minggle](https://github.com/Minggle) (#10) ·\n[4FMTWRV](https://github.com/4FMTWRV) (#6) ·\n[glzhangzhi](https://github.com/glzhangzhi)(per-session SSH 连接池修复)\n\n> 名单随版本更新;头像墙之外的每一份 issue 报告、复现步骤、根因线索同样珍贵——\n> 本仓库近半修复的起点都是一条写清楚的 issue。\n\n</details>\n",
106
+ "readme": "[English](https://github.com/flymysql/dsh-remote/blob/main/README.en.md) · **中文**\n\n# dsh-remote\n\n[![npm version](https://img.shields.io/npm/v/dsh-remote)](https://www.npmjs.com/package/dsh-remote)\n[![downloads](https://img.shields.io/npm/dw/dsh-remote)](https://www.npmjs.com/package/dsh-remote)\n[![downloads](https://img.shields.io/npm/dm/dsh-remote)](https://www.npmjs.com/package/dsh-remote)\n[![license](https://img.shields.io/github/license/flymysql/dsh-remote)](https://github.com/flymysql/dsh-remote/blob/main/LICENSE)\n[![dsh-plugin](https://img.shields.io/badge/topic-dsh--plugin-7a3ef3)](https://github.com/topics/dsh-plugin)\n\n由 [@flymysql](https://github.com/flymysql) 维护 · [主页](https://flymysql.github.io/dsh-remote/) · [用量统计](https://flymysql.github.io/dsh-remote/stats/) · [博客](https://gitpull.cn) · [讨论区](https://github.com/flymysql/dsh-remote/discussions) · [Issue](https://github.com/flymysql/dsh-remote/issues) · [English](https://github.com/flymysql/dsh-remote/blob/main/README.en.md)\n\n![dsh-remote —— 远程项目,完整上下文](https://raw.githubusercontent.com/flymysql/dsh-remote/main/docs/shots/workspace-overview.png)\n\n在 [DeepSeek Harness](https://github.com/deepseek-ai/deepseek-harness) 中,把 SSH 主机变成日常开发工作区:管理多主机项目,浏览和编辑远程文件、递归搜索文件与内容、使用终端、查看 Git 差异、建立本地/反向端口隧道;让 Agent 在所属远程工作区中读写文件、执行命令、构建和测试。多个工作区可独立并行。\n\n可按习惯使用普通布局,或切换 **IDE 三栏布局**,并排查看远程文件、编辑器与原生 Agent 会话;切换时保留任务和未保存编辑。\n\n<img src=\"https://raw.githubusercontent.com/flymysql/dsh-remote/main/docs/shots/workbench-ide.png\" alt=\"DSH 远程工作区 IDE 模式:远程文件树、代码编辑器和原生 Agent 会话三栏\" width=\"1200\"/>\n\n## 安装\n\n```bash\ndsh plugin --profile web add dsh-remote\n```\n\n安装或升级后,重启 DSH Web 并刷新页面。自动更新状态在设置 → 远程工作区 → 插件偏好中查看。\n\n[1.5.0 更新说明](https://github.com/flymysql/dsh-remote/blob/main/docs/release/1.5.0.md):Web 隧道断链自愈、下载到浏览器所在机器、高 RTT 提速 6 倍、堡垒机终端纯登录模式。\n\n## 3 步开始\n\n1. **配置主机**:设置 → 远程工作区,编辑 SSH 配置或保存主机凭据;直接写在 `~/.ssh/config` 里的 Host 会出现在主机列表中,点该行的「…」菜单 →「编辑」即可保存成机器并填写登录密码(保存前后入口都是同一个「…」菜单)。打开设置会自动检查连通性,无需手动“连接”。\n2. **创建工作区**:添加工作区 → 远程,选择主机与目录。每个工作区独立绑定主机,设置页不选目录或“当前远程机”。\n3. **开始开发**:打开工作区文件或切换 IDE 模式,文件打开即可编辑并显示语法高亮,在远端搜索、运行命令并与 Agent 协作。\n\n<img src=\"https://raw.githubusercontent.com/flymysql/dsh-remote/main/docs/shots/workspace-picker-browse.png\" alt=\"选择远程目录:固定路径与确认栏,目录列表占据弹窗主要区域\" width=\"720\"/>\n\n## 本地工作区也能用\n\n打开普通本地项目后,点击 **IDE 模式** 或 **工作区文件**,即可使用同一套文件树、高亮编辑、递归搜索、Git 差异与本地终端。无需配置 SSH;Agent 继续使用宿主原生文件和命令工具,多个本地、远程项目可并行工作。\n\n<img src=\"https://raw.githubusercontent.com/flymysql/dsh-remote/main/docs/shots/workbench-local.png\" alt=\"本地工作区:文件搜索、高亮编辑和原生 Agent 会话,Agent 已实际完成本地构建\" width=\"1200\"/>\n\n## 日常开发\n\n### 搜索远端文件与内容\n\n文件、目录和内容递归搜索,无需先展开目录或同步镜像。默认界面只显示搜索范围与进度摘要;按需展开搜索选项、扫描详情,支持大小写、忽略项、停止与重试。点击结果进入目录或文件对应行。\n\n<img src=\"https://raw.githubusercontent.com/flymysql/dsh-remote/main/docs/shots/workbench-search-results.png\" alt=\"简洁远程搜索:名称搜索结果包含嵌套目录与文件\" width=\"675\"/>\n\n### 查看远端 Git 改动\n\n分别查看工作区和已暂存 diff,筛选文件,点击改动行定位源码。面板只读,不提交或修改暂存区。\n\n<img src=\"https://raw.githubusercontent.com/flymysql/dsh-remote/main/docs/shots/workbench-git.png\" alt=\"远端 Git 工作区与已暂存改动、文件列表和源码 diff\" width=\"675\"/>\n\n### 在远端运行终端\n\n终端进入当前会话的远程目录;像素鱼欢迎图后接真实 SSH shell。已保存凭据可自动应答,支持多终端并行。\n\n<img src=\"https://raw.githubusercontent.com/flymysql/dsh-remote/main/docs/shots/workbench-terminal.png\" alt=\"DSH 远程终端:像素鱼欢迎图与实际 SSH 命令输出\" width=\"1000\"/>\n\n### 端口转发(SSH 隧道)\n\n谁要发起访问,就在谁那边开监听口:监听口开在本机是本地转发(`ssh -L`),开在远端是远程转发(`ssh -R`)。可同时运行多条;添加转发时可以选择「主机」,每条转发只属于一台机器——给还没连接的主机也能先存下转发,连上后再启动。每条转发都可以点「编辑」调整方向、端口、目标或所属主机,运行中的会先停止、保存后按新配置重新启动。每行能直接勾选「自动重连」——只恢复上次运行中的转发,且按机器隔离,反向转发首次勾选会提示远端监听风险。\n\n从旧版本升级:旧版没有 `lastActive` 的「自动重连」配置会暂停,行上显示「需重新确认」;重新勾选后才会参与自动恢复(反向转发需重新确认远端监听)。\n\n<img src=\"docs/shots/port-forwards.png\" alt=\"端口转发面板:本地/反向方向、自动重连勾选框与添加转发表单\" width=\"900\"/>\n\n### 与 Agent 一起修改和构建\n\n工具卡展示已应用改动、实际退出码和构建输出,编译诊断可跳转源码。编辑器保存会检测远端冲突、保留 CRLF,并保护保存期间继续输入的内容。\n\n<img src=\"https://raw.githubusercontent.com/flymysql/dsh-remote/main/docs/shots/workbench-applied-diff.png\" alt=\"Agent 远程编辑成功后的已应用 diff、路径与增删行数\" width=\"485\"/>\n\n## 兼容与边界\n\n- 主要面向 **DSH Web 0.2.x**;0.2.2 需要 **Node.js ≥24.9**。旧版宿主回退、Desktop/TUI 与 Agent diff 差异见[兼容说明](https://github.com/flymysql/dsh-remote/blob/main/docs/reference.zh.md#dsh-版本兼容性)。\n- 文件栏直接访问远端;镜像按需同步。草稿在当前页面内存,崩溃或强制退出仍可能丢失。\n- 不提供远端语言服务、扩展宿主或调试器。Agent 使用配置的 SSH 身份执行命令,请只配置可信主机。\n\n## 文档与社区\n\n[完整工具与配置参考](https://github.com/flymysql/dsh-remote/blob/main/docs/reference.zh.md) · [排障](https://github.com/flymysql/dsh-remote/blob/main/docs/troubleshooting.md) · [自更新修复](https://github.com/flymysql/dsh-remote/blob/main/docs/self-heal.md) · [升级指南](https://github.com/flymysql/dsh-remote/blob/main/docs/migration-1.0.md) · [更新记录](https://github.com/flymysql/dsh-remote/blob/main/CHANGELOG.md)\n\n[主页](https://flymysql.github.io/dsh-remote/) · [讨论区](https://github.com/flymysql/dsh-remote/discussions) · [反馈问题](https://github.com/flymysql/dsh-remote/issues) · [贡献指南](https://github.com/flymysql/dsh-remote/blob/main/CONTRIBUTING.md) · [贡献者与致谢](#贡献者与致谢)\n\n由 [@flymysql](https://github.com/flymysql) 与社区共同维护 · [MIT](https://github.com/flymysql/dsh-remote/blob/main/LICENSE)\n\n### 贡献者与致谢\n\n感谢每一位让这个项目更好的朋友(头像可点进主页;按提交数排序,机器人不计):\n\n<p align=\"left\">\n <a href=\"https://github.com/flymysql\"><img src=\"https://avatars.githubusercontent.com/u/37113068?s=80&v=4\" width=\"40\" height=\"40\" alt=\"@flymysql\" title=\"@flymysql\" /></a>\n <a href=\"https://github.com/baiseraku\"><img src=\"https://avatars.githubusercontent.com/u/139727690?s=80&v=4\" width=\"40\" height=\"40\" alt=\"@baiseraku\" title=\"@baiseraku\" /></a>\n <a href=\"https://github.com/glzhangzhi\"><img src=\"https://avatars.githubusercontent.com/u/36995275?s=80&v=4\" width=\"40\" height=\"40\" alt=\"@glzhangzhi\" title=\"@glzhangzhi\" /></a>\n <a href=\"https://github.com/hjwsm1989\"><img src=\"https://avatars.githubusercontent.com/u/1067541?s=80&v=4\" width=\"40\" height=\"40\" alt=\"@hjwsm1989\" title=\"@hjwsm1989\" /></a>\n <a href=\"https://github.com/j10ha0\"><img src=\"https://avatars.githubusercontent.com/u/72346906?s=80&v=4\" width=\"40\" height=\"40\" alt=\"@j10ha0\" title=\"@j10ha0\" /></a>\n <a href=\"https://github.com/FoolishWiser\"><img src=\"https://avatars.githubusercontent.com/u/104308087?s=80&v=4\" width=\"40\" height=\"40\" alt=\"@FoolishWiser\" title=\"@FoolishWiser\" /></a>\n <a href=\"https://github.com/kakaa-nju\"><img src=\"https://avatars.githubusercontent.com/u/79886619?s=80&v=4\" width=\"40\" height=\"40\" alt=\"@kakaa-nju\" title=\"@kakaa-nju\" /></a>\n <a href=\"https://github.com/4FMTWRV\"><img src=\"https://avatars.githubusercontent.com/u/190457700?s=80&v=4\" width=\"40\" height=\"40\" alt=\"@4FMTWRV\" title=\"@4FMTWRV\" /></a>\n <a href=\"https://github.com/dahaipeng\"><img src=\"https://avatars.githubusercontent.com/u/25660610?s=80&v=4\" width=\"40\" height=\"40\" alt=\"@dahaipeng\" title=\"@dahaipeng\" /></a>\n <a href=\"https://github.com/davidlin2k\"><img src=\"https://avatars.githubusercontent.com/u/17074619?s=80&v=4\" width=\"40\" height=\"40\" alt=\"@davidlin2k\" title=\"@davidlin2k\" /></a>\n <a href=\"https://github.com/FlintyLemming\"><img src=\"https://avatars.githubusercontent.com/u/19165511?s=80&v=4\" width=\"40\" height=\"40\" alt=\"@FlintyLemming\" title=\"@FlintyLemming\" /></a>\n <a href=\"https://github.com/GDWhisper\"><img src=\"https://avatars.githubusercontent.com/u/129148123?s=80&v=4\" width=\"40\" height=\"40\" alt=\"@GDWhisper\" title=\"@GDWhisper\" /></a>\n <a href=\"https://github.com/YiHui-Liu\"><img src=\"https://avatars.githubusercontent.com/u/30190271?s=80&v=4\" width=\"40\" height=\"40\" alt=\"@YiHui-Liu\" title=\"@YiHui-Liu\" /></a>\n <a href=\"https://github.com/Minggle\"><img src=\"https://avatars.githubusercontent.com/u/35053182?s=80&v=4\" width=\"40\" height=\"40\" alt=\"@Minggle\" title=\"@Minggle\" /></a>\n <a href=\"https://github.com/nekomona\"><img src=\"https://avatars.githubusercontent.com/u/25474483?s=80&v=4\" width=\"40\" height=\"40\" alt=\"@nekomona\" title=\"@nekomona\" /></a>\n <a href=\"https://github.com/shis23\"><img src=\"https://avatars.githubusercontent.com/u/189869650?s=80&v=4\" width=\"40\" height=\"40\" alt=\"@shis23\" title=\"@shis23\" /></a>\n</p>\n\n<details>\n<summary>贡献记录与早期贡献者</summary>\n\n近期的亮点贡献(欢迎随时加入这个名单):\n\n| 贡献者 | 做了什么 |\n| --- | --- |\n| [@baiseraku](https://github.com/baiseraku) | 整个 dsh-tui 适配层([#92](https://github.com/flymysql/dsh-remote/pull/92))+ 底栏机器名修正([#98](https://github.com/flymysql/dsh-remote/pull/98)) |\n| [@hjwsm1989](https://github.com/hjwsm1989) | 远程 .md 渲染连环两道:memo 守卫([#102](https://github.com/flymysql/dsh-remote/pull/102))+ labels 契约([#107](https://github.com/flymysql/dsh-remote/pull/107)) |\n| [@shis23](https://github.com/shis23) | rw_sync 路径映射纠偏 + SFTP 超时韧性([#105](https://github.com/flymysql/dsh-remote/pull/105)) |\n| [@davidlin2k](https://github.com/davidlin2k) | 无凭据机器走用户自有 ssh([#100](https://github.com/flymysql/dsh-remote/pull/100)) |\n| [@GDWhisper](https://github.com/GDWhisper) | 目录补全逐字符重连修复([#42](https://github.com/flymysql/dsh-remote/pull/42),issue #41) |\n| [@glzhangzhi](https://github.com/glzhangzhi) | 多远端会话的连接池隔离(issue #25 的主体修复) |\n\n早期已合并 PR 的贡献者(考古名单):\n\n\n\n[@dahaipeng](https://github.com/dahaipeng) (#31) ·\n[@YiHui-Liu](https://github.com/YiHui-Liu) (#28) ·\n[@nekomona](https://github.com/nekomona) (#24) ·\n[@zhz1667](https://github.com/zhz1667) (#43) ·\n[FoolishWiser](https://github.com/FoolishWiser) (#17) ·\n[@jace1cch](https://github.com/jace1cch) (#16) ·\n[@Minggle](https://github.com/Minggle) (#10) ·\n[4FMTWRV](https://github.com/4FMTWRV) (#6) ·\n[glzhangzhi](https://github.com/glzhangzhi)(per-session SSH 连接池修复)\n\n> 名单随版本更新;头像墙之外的每一份 issue 报告、复现步骤、根因线索同样珍贵——\n> 本仓库近半修复的起点都是一条写清楚的 issue。\n\n</details>\n",
107
107
  "readmeFilename": "README.md"
108
108
  }