dsh-remote-vs 0.9.3 → 0.11.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.
Files changed (44) hide show
  1. package/README.en.md +13 -10
  2. package/README.md +14 -9
  3. package/cordis.patch.yml +10 -5
  4. package/lib/client.js +3319 -1093
  5. package/lib/index.js +211 -9
  6. package/lib/types/client/api.d.ts +12 -0
  7. package/lib/types/client/composer.d.ts +5 -1
  8. package/lib/types/client/exec-output.d.ts +58 -0
  9. package/lib/types/client/i18n.d.ts +1 -1
  10. package/lib/types/client/scm/CommitPane.d.ts +73 -0
  11. package/lib/types/client/scm/ExecPanel.d.ts +34 -0
  12. package/lib/types/client/scm/HistoryPanel.d.ts +12 -4
  13. package/lib/types/client/scm/actions.d.ts +50 -3
  14. package/lib/types/client/scm/commit-model.d.ts +119 -0
  15. package/lib/types/client/store.d.ts +9 -3
  16. package/lib/types/client/vsc/kit.d.ts +16 -0
  17. package/lib/types/git-format.d.ts +5 -0
  18. package/lib/types/git-ops.d.ts +57 -2
  19. package/lib/types/index.d.ts +5 -0
  20. package/lib/types/pool.d.ts +9 -0
  21. package/lib/types/protocol.d.ts +23 -0
  22. package/lib/types/timeouts.d.ts +17 -2
  23. package/package.json +37 -37
  24. package/src/client/SettingsHosts.tsx +2 -1
  25. package/src/client/api.ts +61 -0
  26. package/src/client/composer.ts +11 -2
  27. package/src/client/exec-output.ts +129 -0
  28. package/src/client/i18n.ts +133 -4
  29. package/src/client/scm/CommitPane.tsx +726 -0
  30. package/src/client/scm/ExecPanel.tsx +124 -0
  31. package/src/client/scm/HistoryPanel.tsx +483 -104
  32. package/src/client/scm/ScmPanel.tsx +247 -9
  33. package/src/client/scm/actions.ts +93 -10
  34. package/src/client/scm/commit-model.ts +317 -0
  35. package/src/client/store.tsx +13 -6
  36. package/src/client/vsc/kit.tsx +71 -0
  37. package/src/client/vsc/vsc.css +647 -0
  38. package/src/git-format.ts +7 -3
  39. package/src/git-ops.ts +83 -7
  40. package/src/index.ts +10 -2
  41. package/src/pool.ts +84 -4
  42. package/src/protocol.ts +14 -0
  43. package/src/routes.ts +135 -1
  44. package/src/timeouts.ts +18 -2
package/README.en.md CHANGED
@@ -5,7 +5,7 @@
5
5
  [中文](./README.md) | English
6
6
 
7
7
  SSH host management inside the DSH Host process + helper push pipeline + a **VS Code-style remote
8
- workbench** (explorer / search / source control / commit graph / multi-tab editor / floating editor /
8
+ workbench** (explorer / search / source control / commit graph with its commit-details pane / multi-tab editor / floating editor /
9
9
  side-by-side diff / multiple terminals). Hosts live in DSH Settings ("Remote hosts"); with `dsh-better-sidebar` installed
10
10
  there is an extra standalone "Remote" tab, otherwise it falls back to a native right-Sidebar "Remote"
11
11
  page (same content, self-opened from the guide, per-session instances). The editor is ALSO mounted into
@@ -37,8 +37,9 @@ dsh plugin --profile web add dsh-remote-vs
37
37
  (From npm, recommended; installing straight from the repository also works:
38
38
  `dsh plugin --profile web add github:xiray-xia/dsh-remote-vs`.)
39
39
 
40
- Requires DSH `0.2.1-alpha.3` or newer (`engines.dsh` enforces the range; **the tested
41
- baseline is `0.2.1-rc.2`**). `--profile web` selects which profile to install into —
40
+ Requires DSH `0.2.2-alpha.2` or newer (`engines.dsh` enforces the range; **the tested
41
+ baseline is `0.2.2-alpha.2`**). Older Hosts (`0.2.1-rc.2` generation) need plugin `0.9.3`: the
42
+ Remote preset of this version uses the `0.2.2-alpha.2` tool schema. `--profile web` selects which profile to install into —
42
43
  this is a Web plugin, so it has to go into the profile your Web GUI runs from (`web` is
43
44
  the common name; use your own profile's name).
44
45
 
@@ -64,10 +65,10 @@ it cannot be waived from the dependency side, only removed from the tree. Then r
64
65
  | --- | --- |
65
66
  | Explorer | Lazy tree + expand/collapse + hidden-files toggle; context menu: new / rename / delete / copy / move / paste / find in folder / insert `@` reference; git status colours and folder roll-up marks |
66
67
  | Search | Two modes: **file names** (remote `find`) and **contents** (remote `grep`). Content mode has a scope folder, `Aa` (case) / `ab_` (whole word) / `.*` (regex), results grouped per file with match highlights, and clicking a hit jumps to that line |
67
- | Source control | **Repository-folder picker** (for workspaces whose git repository lives in a sub-folder: browse the remote tree, one-click jump to any repository discovered inside the workspace, type a relative or absolute path, and see which repository each folder resolves to); changes / staged / untracked / ignored buckets; **untracked directory rows expand on click**; per-file AND **per-hunk** stage / unstage / discard (behind a confirm) / commit; branches, remotes and stash panes; sync (fetch/pull/push) |
68
+ | Source control | **Repository-folder picker** (for workspaces whose git repository lives in a sub-folder: browse the remote tree, one-click jump to any repository discovered inside the workspace, type a relative or absolute path, and see which repository each folder resolves to); changes / staged / untracked / ignored buckets; **untracked directory rows expand on click**; per-file AND **per-hunk** stage / unstage / discard (behind a confirm) / commit; branches, remotes and stash panes; sync (fetch/pull/push), with **push refspec support** (Gerrit style `HEAD:refs/for/<branch>`; empty = plain `git push`, a non-empty value is remembered); fetch/pull/push/sync get a **live output panel** (server-sent events showing git/remote output, a running clock, **cancel** that kills the remote process group, and the full log for copying afterwards; an older Host without the streaming route falls back to the one-shot result) |
68
69
  | Session change review | The **collapsible** panel above the composer: what THIS SESSION changed (one row per file, file-type icon, `+a −b` on the right); clicking a file opens it in the remote editor with **line shading plus character-level inline diff**, `n/N ↑↓` jumps between change points, and hovering a changed line offers **Undo this change** (remote `git apply -R`). See "Session change review" below |
69
70
  | Side-by-side diff | Panes stay **exactly equal** + per-hunk buttons in the middle gutter + a **top horizontal scrollbar** (a very long line can no longer break the symmetry) + pinned line numbers, **rendering only the rows inside the viewport** (a 3000-line file goes from 9000 row containers to ~174, with exactly the same scroll range as a full render); switch between "before / after", and the after side is editable and savable |
70
- | Commit graph | SVG branch/merge graph + commit details + click a commit to expand its changed files + open the diff |
71
+ | Commit graph | SVG branch/merge graph; selecting a commit opens the **resizable / expandable commit-details pane** below it with three views: **Commit details** (subject, author, time, full hash + copy, parents, refs, message body, checkout), **Contents** (changed files grouped by directory, collapsible and path-filterable; click for the diff, right-click or the row button to open in the editor), **Diff** (only the first ~1500 rows start expanded, later files start folded; both line numbers, `+/−` counts, line wrapping, previous/next-file navigation, and copy of one file's patch or the whole patch). Merge commits are shown against their **first parent** (git lists no files for a merge otherwise) |
71
72
  | Multi-tab editor | Open/save/reload, dirty marks, several files at once; image preview, Markdown/HTML preview (source vs preview) |
72
73
  | Floating editor | Three entries: "Open in floating editor" in the file-tree / search-hit / source-control context menus, plus **double-clicking the "remote editor" tab** to float the editor as it stands (same tabs, previews, diff, find and change marks — not a second, thinner editor). Drag the title bar to move, drag any of the eight edges/corners to resize, maximize/restore (or double-click the title bar); **minimize to a draggable floating ball** (dirty dot on it, click or press Enter to restore, drag to park it anywhere); `Ctrl+wheel` zooms the editor text. Position, size, font size and the ball's spot survive a page refresh |
73
74
  | Syntax highlighting | VS Code **Dark+ / Light+** palettes; covers java/aidl/smali, c/c++, go, rust, js/ts, json, py, yaml, xml, html/css, md, sh, properties/rc/toml, diff …; a **fallback colorer** takes over when no grammar matches, so a file is never left monochrome. Honest caveat: kotlin / gradle / smali are coloured by the Java grammar (no dedicated package), which gets keywords, strings and comments right but does not split their own syntax |
@@ -86,8 +87,8 @@ it cannot be waived from the dependency side, only removed from the tree. Then r
86
87
  | Remote files | SFTP browse / read / write / create / delete / rename. Boundaries hardened: 0-byte files no longer deadlock, and every SFTP operation times out at 60s and releases its channel; **a single directory listing is capped at 20000 entries** (the first 20000 after sorting — directories first, then names — announced in the host log; the protocol carries no "truncated" field, so the UI has no marker) |
87
88
  | Remote terminal | ssh2 PTY + WebSocket, xterm rendering (copy-paste/theme-follow/reconnect-on-refresh); **a reattach only takes over, it does not resize** (a page reload no longer shrinks a running shell to 80×24); an output backlog applies real backpressure to the far end; **frames are capped at 1 MiB**, and pastes past 64 Ki characters are chunked on code points by the client instead of dropping the connection |
88
89
  | Concurrent channels | At most **6** remote channels per host at a time (no longer colliding with the far end's sshd `MaxSessions`); the 7th queues for up to **30 seconds** and then fails with `remote host <alias> is busy` instead of piling on connections |
89
- | Timeouts and process cleanup | exec runs in its own session (`setsid --wait`); on timeout it sends TERM and **escalates to KILL after 3 seconds**, reaping the child processes with it; a host without `setsid --wait` is detected by a one-shot probe and falls back to the old behaviour, with a host-log line saying the timed-out remote command may still be running |
90
- | Git graph | Remote repo status + branches + SVG commit graph + commit details (exec + frontend parsing, zero Host additions) |
90
+ | Timeouts and process cleanup | Ordinary git commands default to 300 s (configurable); the **network verbs (fetch/pull/push/sync) default to 20 minutes with a 30-minute ceiling**. exec runs in its own session (`setsid --wait`); on timeout OR cancel it sends TERM and **escalates to KILL after 3 seconds**, reaping the child processes with it; a host without `setsid --wait` is detected by a one-shot probe and falls back to the old behaviour, with a host-log line saying the timed-out remote command may still be running |
91
+ | Git graph | Remote repo status + branches + SVG commit graph + commit details/contents/diff pane (exec + frontend parsing, zero Host additions) |
91
92
  | Import | One-click import from `~/.ssh/config` and from an existing `dsh-ssh.json` (read once, no coupling) |
92
93
 
93
94
  ### Agent capabilities
@@ -150,7 +151,9 @@ dsh_remote_vs/
150
151
  │ ├── scm/ # ── source control ──
151
152
  │ │ ├── ScmPanel.tsx # changes/staged/untracked + per-file and per-hunk actions + commit box
152
153
  │ │ ├── DiffView.tsx # side-by-side diff (top scrollbar/hunk buttons/editable after side)
153
- │ │ ├── HistoryPanel.tsx # SVG commit graph + commit details + expanded changed files
154
+ │ │ ├── HistoryPanel.tsx # SVG commit graph + resizable/expandable commit-details pane
155
+ │ │ ├── CommitPane.tsx # details/contents/diff tabs + patch toolbar + context menus
156
+ │ │ ├── commit-model.ts # patch blocks/line numbers/counts/directory grouping/file stepping (pure)
154
157
  │ │ ├── actions.ts # remote git action layer (over the exec channel)
155
158
  │ │ ├── diff-model.ts # unified diff → side-by-side row projection (pure)
156
159
  │ │ └── status-map.ts # status bucketing + tree marks (pure)
@@ -301,7 +304,7 @@ over helper RPC (fs) / ssh2 (processes), local stays untouched; both share one H
301
304
 
302
305
  - Alias dirs: `$DSH_HOME/remote-ssh/aliases/<id>` (empty shells, routing keys only), auto-registered into the native workspace list as `<server> > <base>`
303
306
  - Routing switch (dropdown at the top of Settings → Remote hosts; underneath it is profile patch `- id: remote-vs`, `config.routingMode`, volatile, no restart):
304
- `off` (default, local passthrough) / `shadow` (logs, still local) / `enforce` (real routing)
307
+ default `enforce` (real routing); switch to `off` (pure local passthrough) / `shadow` (logs, still local) as debugging escapes
305
308
  - New workspace: the native "Add workspace…" entry is adopted (local/remote dual tab; remote leg = host→push→bind wizard)
306
309
  - Presets: a `Remote` preset (bash toolset); under enforce, new remote sessions switch to it automatically (default preset only, never overrides an explicit choice)
307
310
  - Ground truths (measured, not assumed):
@@ -319,7 +322,7 @@ over helper RPC (fs) / ssh2 (processes), local stays untouched; both share one H
319
322
  Upstream never published helper binaries (all Release assets are empty), so this plugin builds its own:
320
323
 
321
324
  - Build machine: WSL2 Ubuntu-22.04 (glibc 2.35, matching the remote targets), Node v24.21.0 + pnpm 11.28.5
322
- - Sources: the `dsh-v0.2.1-alpha.2` tag (the **build baseline**: what must match is the wire protocol version, not the Host version — it is still 2, so a Host upgrade to alpha.4 or alpha.5 does not require a rebuild)
325
+ - Sources: the `dsh-v0.2.1-alpha.2` tag (the **build baseline**: what must match is the wire protocol version, not the Host version — our protocol is still **2**, so a Host upgrade to `0.2.2-alpha.2` needs no rebuild either: the plugin intentionally stays on `dsh-ssh@0.2.1-rc.2`, and the new generation's protocol 3 is deliberately not followed — see §2.26 of the maintenance notes)
323
326
  - Command: stock script `pnpm exec tsx scripts/build-exe-for-ssh-helper.ts --target=node24-linux-x64`
324
327
  - Only deviation: no docker for the manylinux 2.28 rebuild, so a `DSH_GLIBC_CEILING`
325
328
  env override was added (default stays 2.28); this build targets 2.35 (see `glibc-ceiling.patch` in the cache dir)
package/README.md CHANGED
@@ -5,7 +5,7 @@
5
5
  中文 | [English](./README.en.md)
6
6
 
7
7
  Host 进程内的 SSH 主机管理 + helper 推送流水线 + **VS Code 式远端工作台**
8
- (资源管理器 / 搜索 / 源代码管理 / 提交图 / 多标签编辑器 / 悬浮编辑器 / 并排 Diff / 多终端)。
8
+ (资源管理器 / 搜索 / 源代码管理 / 提交图与提交详情面板 / 多标签编辑器 / 悬浮编辑器 / 并排 Diff / 多终端)。
9
9
  主机配在 DSH 设置里(“远程主机”项);装了 `dsh-better-sidebar` 时另有
10
10
  独立“远程”tab,没装则退到原生右侧栏“远程”页(同内容,引导页自助开,per-session 实例)。
11
11
  编辑器还额外挂到会话视图槽,与“对话 / 轨迹”并列成一个**远程编辑器**标签,
@@ -34,7 +34,8 @@ dsh plugin --profile web add dsh-remote-vs
34
34
 
35
35
  (从 npm 装,推荐;也可以直接跟仓库装:`dsh plugin --profile web add github:xiray-xia/dsh-remote-vs`。)
36
36
 
37
- 要求 DSH `0.2.1-alpha.3` 及以上(`engines.dsh` 门到底;**当前实测基线 `0.2.1-rc.2`**)。
37
+ 要求 DSH `0.2.2-alpha.2` 及以上(`engines.dsh` 门到底;**当前实测基线 `0.2.2-alpha.2`**)。
38
+ 旧 Host(`0.2.1-rc.2` 一代)请用插件 `0.9.3`:新版的 Remote 预设用了 `0.2.2-alpha.2` 的工具 schema。
38
39
  `--profile web` 指明装进哪个 profile —— 本插件是 Web 插件,
39
40
  必须装进 Web GUI 所用的那个(`web` 是常见命名,以你自己的 profile 名为准)。
40
41
 
@@ -55,10 +56,10 @@ dsh plugin --profile web add dsh-remote-vs
55
56
  | --- | --- |
56
57
  | 资源管理器 | 懒加载目录树 + 展开折叠 + 隐藏文件开关;右键菜单:新建/改名/删除/复制/移动/粘贴/在此文件夹查找/插入 `@` 引用;git 状态色与文件夹聚合标记 |
57
58
  | 搜索 | 两档:**文件名**(远端 `find`)与**内容**(远端 `grep`)。内容档带范围目录、`Aa`(大小写)/`ab_`(全字)/`.*`(正则)、结果按文件分组、命中高亮,点条目跳到该行 |
58
- | 源代码管理 | **仓库目录选择器**(工作区里的 git 在子目录时用:浏览远端目录、一键跳到工作区内发现的仓库、手输相对/绝对路径,并逐目录提示会落在哪个仓库);变更/暂存/未跟踪/忽略分桶,**未跟踪目录行可点击展开**,逐文件与**逐 hunk** 暂存/还原、丢弃(带确认)、提交;分支/远程/stash 面板;同步(fetch/pull/push) |
59
+ | 源代码管理 | **仓库目录选择器**(工作区里的 git 在子目录时用:浏览远端目录、一键跳到工作区内发现的仓库、手输相对/绝对路径,并逐目录提示会落在哪个仓库);变更/暂存/未跟踪/忽略分桶,**未跟踪目录行可点击展开**,逐文件与**逐 hunk** 暂存/还原、丢弃(带确认)、提交;分支/远程/stash 面板;同步(fetch/pull/push),**推送支持自定义 refspec**(如 Gerrit `HEAD:refs/for/<分支>`;留空 = 普通 `git push`,非空值会记住);fetch/pull/push/sync 有**实时输出面板**(SSE 流式显示 git/远端输出、运行计时、**可取消**(杀掉远端进程组)、完成后可复制完整输出;老 Host 无流式路由时自动回退到一次性结果) |
59
60
  | 会话改动审阅 | 输入框上方的**可收纳**面板,按**会话**列出改了什么(一行一个文件、文件类型图标、右侧 `+a −b`);点文件在远程编辑器里打开并画**整行着色 + 行内字符级差异**,右上角 `n/N ↑↓` 跳改动点,悬浮改动行可**撤销**这处改动(远端 `git apply -R`)。详见下文「会话改动审阅」 |
60
61
  | 并排 Diff | 左右**严格等分** + 中间 gutter 逐 hunk 按钮 + **顶部横向滚动条**(一行很长也不会破坏对称)+ 行号钉在左侧,**只渲染视口内的行**(3000 行文件从 9000 个行容器降到约 174 个,滚动范围与整篇渲染完全一致);可切「变更前 / 变更后」,变更后可编辑并保存 |
61
- | 提交图 | SVG 分支/合并图 + 提交详情 + 点击提交展开变更文件 + 进文件看 diff |
62
+ | 提交图 | SVG 分支/合并图;点选提交后,下方**可调高度 / 可全屏**的提交详情面板给出三个视图:**提交详情**(标题、作者、时间、完整哈希+复制、父提交、ref、正文、检出)、**内容**(改动文件按目录分组、可折叠、可过滤,单击看差异、右键或行尾按钮在编辑器中打开)、**差异**(默认只展开前约 1500 行、其余文件折叠;双行号、`+/−` 计数、自动换行、上一/下一个文件、复制文件补丁或整个补丁)。合并提交按**首父**展示(git 对 merge 默认不给文件列表) |
62
63
  | 多标签编辑器 | 打开/保存/重载、脏标记、多文件标签并存;图片预览、Markdown/HTML 预览(源码/预览切换) |
63
64
  | 悬浮编辑器 | 三个入口:文件树 / 搜索结果 / 源代码管理右键「在悬浮编辑器中打开」,以及**双击会话视图的「远程编辑器」标签**把当前编辑器整体浮出(同一套标签、预览、Diff、查找、改动标记,不是另写一个编辑器)。窗口可拖标题栏移动、拖八个边角缩放、最大化/还原、双击标题栏切换最大化;**最小化成一个可拖动的悬浮球**(球上有未保存脏点,点一下或按 Enter 恢复,拖动可换位置);`Ctrl+滚轮` 缩放编辑器字号;位置、大小、字号和球的位置跨刷新记住 |
64
65
  | 语法高亮 | VS Code **Dark+ / Light+** 配色;覆盖 java/aidl/smali、c/c++、go、rust、js/ts、json、py、yaml、xml、html/css、md、sh、properties/rc/toml、diff 等;**兜底着色器**在语法包没命中时自动接管,不会出现整篇无色。诚实说明:kotlin / gradle / smali 用 Java 语法着色(没有专用语法包),效果是关键字/字符串/注释正确、专有语法不细分 |
@@ -77,8 +78,8 @@ dsh plugin --profile web add dsh-remote-vs
77
78
  | 远端文件 | SFTP 浏览 / 读 / 写 / 新建 / 删除 / 改名。边界已加固:0 字节文件不再卡死,每个 SFTP 操作 60s 超时回收通道;**单个目录列表上限 20000 条**(按"目录在前、其余按名"排序后取前 20000,宿主日志说明——协议里没有"已截断"字段,界面上没有标记) |
78
79
  | 远端终端 | ssh2 PTY + WebSocket,xterm 渲染(复制粘贴/主题跟随/刷新重连);**重新挂接只接管、不改尺寸**(刷新页面不会把运行中的 shell 缩成 80×24);输出积压时对远端施加真背压;**单帧上限 1 MiB**,超过 64 Ki 字符的粘贴在客户端按码点分块发送,不再撑断连接 |
79
80
  | 并发通道 | 每主机同时最多 **6 条**远端通道(不再撞远端 sshd 的 `MaxSessions`);第 7 个排队最多等 **30 秒**,超时明确报 `remote host <alias> is busy`,而不是无限堆连接 |
80
- | 超时与进程清理 | exec 跑在独立会话里(`setsid --wait`),超时先发 TERM、**3 秒后升级 KILL**,连同子进程一起收掉;远端没有 `setsid --wait` 时探测一次即知,退回旧行为并在宿主日志里写明"超时可能没停掉远端命令" |
81
- | Git 图谱 | 远端仓库状态 + 分支 + SVG 提交图 + 提交详情(exec + 前端解析,零 Host 增量)|
81
+ | 超时与进程清理 | 普通 git 命令默认 300s(设置可调);**网络动词(fetch/pull/push/sync)默认 20 分钟、上限 30 分钟**。exec 跑在独立会话里(`setsid --wait`),超时/取消都先发 TERM、**3 秒后升级 KILL**,连同子进程一起收掉;远端没有 `setsid --wait` 时探测一次即知,退回旧行为并在宿主日志里写明"超时可能没停掉远端命令" |
82
+ | Git 图谱 | 远端仓库状态 + 分支 + SVG 提交图 + 提交详情/内容/差异面板(exec + 前端解析,零 Host 增量)|
82
83
  | 导入 | 从 `~/.ssh/config`、从现有 `dsh-ssh.json` 一键导入(只读一次,不耦合)|
83
84
 
84
85
  ### Agent 能力
@@ -141,7 +142,9 @@ dsh_remote_vs/
141
142
  │ ├── scm/ # ── 源代码管理 ──
142
143
  │ │ ├── ScmPanel.tsx # 变更/暂存/未跟踪 + 逐文件逐 hunk 操作 + 提交框
143
144
  │ │ ├── DiffView.tsx # 并排 diff(顶部横向滚动条/hunk 按钮/可编辑变更后侧)
144
- │ │ ├── HistoryPanel.tsx # SVG 提交图 + 提交详情 + 展开变更文件
145
+ │ │ ├── HistoryPanel.tsx # SVG 提交图 + 可调高度/可全屏的提交详情面板
146
+ │ │ ├── CommitPane.tsx # 提交详情/内容/差异 三标签 + 补丁工具栏 + 右键菜单
147
+ │ │ ├── commit-model.ts # 补丁分块/行号/计数/目录分组/文件步进(纯函数)
145
148
  │ │ ├── actions.ts # 远端 git 动作层(exec 通道)
146
149
  │ │ ├── diff-model.ts # unified diff → 并排行投影(纯函数)
147
150
  │ │ └── status-map.ts # 状态分桶 + 树标记(纯函数)
@@ -266,7 +269,7 @@ helper RPC(fs)/ ssh2(进程),本地一切不变;两者同 Host、共
266
269
 
267
270
  - 别名目录:`$DSH_HOME/remote-ssh/aliases/<id>`(空壳,只做路由键),自动注册进原生工作区列表,标题 `<server> > <base>`
268
271
  - 路由开关(设置 → 远程主机页顶部下拉;底层是 profile patch `- id: remote-vs` 下 `config.routingMode`,volatile,免重启):
269
- `off`(默认,直通本地)/ `shadow`(记日志仍走本地)/ `enforce`(真路由)
272
+ 默认 `enforce`(真路由);可切 `off`(纯直通本地)/ `shadow`(记日志仍走本地)作为排障开关
270
273
  - 新建工作区:原生"添加工作区…"入口已接管(本地/远端双 tab;远端腿=主机→推送→绑定向导)
271
274
  - 预设:`Remote` 预设(bash 工具集);enforce 下远端新会话自动切过去(默认预设才切,不践踏显式选择)
272
275
  - 顶层真相(实测结论,非假设):
@@ -284,7 +287,9 @@ helper RPC(fs)/ ssh2(进程),本地一切不变;两者同 Host、共
284
287
  官方从未发布 helper 二进制(Release assets 全空),本插件走自编译:
285
288
 
286
289
  - 构建机:WSL2 Ubuntu-22.04(glibc 2.35,与目标远端一致),Node v24.21.0 + pnpm 11.28.5
287
- - 源码:`dsh-v0.2.1-alpha.2` tag(**构建基线**:对齐的是 wire 协议号,不是 Host 版本号 —— 协议号至今仍是 2,故 Host 升到 alpha.4 / alpha.5 都无需重编)
290
+ - 源码:`dsh-v0.2.1-alpha.2` tag(**构建基线**:对齐的是 wire 协议号,不是 Host 版本号 —— 我们用到的
291
+ 协议号仍是 **2**,Host 升到 `0.2.2-alpha.2` 也不需要重编:插件自行停在 `dsh-ssh@0.2.1-rc.2`,
292
+ 新 Host 那一代 `dsh-ssh` 的协议 3 我们故意不跟,差异见维护文档 §2.26)
288
293
  - 命令:官方原脚本 `pnpm exec tsx scripts/build-exe-for-ssh-helper.ts --target=node24-linux-x64`
289
294
  - 唯一偏离:无 docker 跑不了 manylinux 2.28 重编,加了 `DSH_GLIBC_CEILING`
290
295
  环境覆盖(默认仍 2.28),本次以 2.35 构建(见缓存目录 `glibc-ceiling.patch`)
package/cordis.patch.yml CHANGED
@@ -54,7 +54,7 @@
54
54
  inject: [localFileReferences, remoteWorlds]
55
55
 
56
56
  # Remote agent preset, bound to this bundle's lifecycle.
57
- # Mirrored from preset-standard @ dsh 0.2.1-alpha.3 with these diffs:
57
+ # Mirrored from preset-standard @ dsh 0.2.2-alpha.2 with these diffs:
58
58
  # 1. persona prefix reframed for remote SSH work (transparent routing);
59
59
  # 2. tool-bash moved into an isolated shell group with our routed bash
60
60
  # executor (stock root shell stays pwsh on Windows);
@@ -67,6 +67,12 @@
67
67
  # preset) right after `tool-plugin-manager` — mirrored here for the same
68
68
  # reason as above: a row missing from the mirror is a preset that silently
69
69
  # loads a different toolset than stock.
70
+ # 0.2.2-alpha.2 note: stock dropped `tool-subagent-list-agents` (the
71
+ # `dsh-tool-subagent-control/list-agents` subpath is gone from the package),
72
+ # renamed `modelSelectionSettings` to `modelSelection` + `modelDiscovery`,
73
+ # and made the plugin-manager row conditional on `profileContext`. All
74
+ # three are mirrored here: the first one is a hard module-resolution error,
75
+ # the other two are schema drift.
70
76
  - id: preset-remote
71
77
  name: '@deepseek-ai/dsh-agent-preset'
72
78
  config:
@@ -207,14 +213,13 @@
207
213
  config:
208
214
  - id: tool-subagent-control
209
215
  name: '@deepseek-ai/dsh-tool-subagent-control'
210
- - id: tool-subagent-list-agents
211
- name: '@deepseek-ai/dsh-tool-subagent-control/list-agents'
212
216
  - id: tool-subagent
213
217
  name: '@deepseek-ai/dsh-tool-subagent'
214
218
  config:
215
219
  provider: spawn
216
220
  toolName: subagent
217
- modelSelectionSettings: true
221
+ modelSelection: true
222
+ modelDiscovery: true
218
223
  - id: tool-subagent-fork
219
224
  name: '@deepseek-ai/dsh-tool-subagent'
220
225
  config:
@@ -241,7 +246,7 @@
241
246
  name: '@deepseek-ai/dsh-tool-present'
242
247
  - id: tool-plugin-manager
243
248
  name: '@deepseek-ai/dsh-plugin-manager/tools'
244
- disabled: true
249
+ disabled: !!js "!ctx.get('profileContext')"
245
250
  - id: tool-plugin-market
246
251
  name: '@deepseek-ai/dsh-plugin-market/tools'
247
252
  disabled: true