dsh-remote-vs 0.26.0 → 0.27.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 +4 -11
- package/README.md +4 -8
- package/THIRD-PARTY-NOTICES.md +7 -2
- package/lib/client.js +6622 -5821
- package/lib/index.js +275 -1
- package/lib/types/client/CodeEditor.d.ts +14 -0
- package/lib/types/client/OutlinePanel.d.ts +22 -0
- package/lib/types/client/ProcessesSection.d.ts +19 -0
- package/lib/types/client/api.d.ts +5 -1
- package/lib/types/client/blame-model.d.ts +77 -0
- package/lib/types/client/i18n.d.ts +1 -1
- package/lib/types/client/outline-model.d.ts +59 -0
- package/lib/types/client/scm/actions.d.ts +12 -1
- package/lib/types/client/store.d.ts +18 -0
- package/lib/types/client/vsc/blame.d.ts +19 -0
- package/lib/types/client/vsc/kit.d.ts +0 -2
- package/lib/types/client/vsc/preview-document.d.ts +46 -0
- package/lib/types/client/vsc/preview-model.d.ts +31 -0
- package/lib/types/client/vsc/preview-services.d.ts +24 -0
- package/lib/types/git-ops.d.ts +18 -0
- package/lib/types/processes.d.ts +43 -0
- package/lib/types/protocol.d.ts +34 -0
- package/package.json +2 -1
- package/src/client/CodeEditor.tsx +43 -1
- package/src/client/EditorPane.tsx +520 -37
- package/src/client/MonitorView.tsx +16 -5
- package/src/client/OutlinePanel.tsx +287 -0
- package/src/client/ProcessesSection.tsx +292 -0
- package/src/client/api.ts +8 -0
- package/src/client/blame-model.ts +242 -0
- package/src/client/i18n.ts +194 -0
- package/src/client/index.tsx +4 -0
- package/src/client/outline-model.ts +775 -0
- package/src/client/scm/HistoryPanel.tsx +38 -1
- package/src/client/scm/actions.ts +55 -2
- package/src/client/store.tsx +54 -5
- package/src/client/vsc/blame.ts +147 -0
- package/src/client/vsc/kit.tsx +3 -11
- package/src/client/vsc/preview-document.tsx +323 -0
- package/src/client/vsc/preview-model.ts +216 -0
- package/src/client/vsc/preview-services.ts +118 -0
- package/src/client/vsc/vsc.css +6509 -5716
- package/src/git-ops.ts +34 -0
- package/src/processes.ts +177 -0
- package/src/protocol.ts +37 -0
- package/src/routes.ts +118 -0
package/README.en.md
CHANGED
|
@@ -108,7 +108,7 @@ extra configuration is needed.
|
|
|
108
108
|
| 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 (the save writes the working-tree file back; a diff above 8MiB is read-only, so a truncated prefix can never be written over the real file) |
|
|
109
109
|
| 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) |
|
|
110
110
|
| AI review | A single-file diff OR a **whole commit** can be handed to the conversation with one click — the request is **appended to the composer draft only** (nothing is sent automatically, and you can edit it first): a diff up to 32 KiB is inlined verbatim; a larger one (or one silently truncated at the 2 MB cap) becomes a summary request — file/commit facts + hunk headers + "fetch it yourself with `git show`" (a 2 MB diff is hundreds of thousands of tokens, so inlining it is pointless); an untracked or binary file is passed by path and the model reads it. Entries: the side-by-side diff toolbar and the commit pane's Diff toolbar; the button is disabled with the reason when the current session is not bound to this remote workspace, or the host exposes no conversation input channel |
|
|
111
|
-
| Multi-tab editor | Open/save/reload, dirty marks, several files at once; **saves are atomic** (side file + rename, writing through symlinks and keeping the mode bits); **a save is checked against the remote baseline** — when the file was written by someone else (an agent through the transparent route, a terminal, another editor) since it was opened, the save is refused and offers "overwrite / load remote version / show difference" instead of overwriting silently; image preview, Markdown/HTML
|
|
111
|
+
| Multi-tab editor | Open/save/reload, dirty marks, several files at once; **saves are atomic** (side file + rename, writing through symlinks and keeping the mode bits); **a save is checked against the remote baseline** — when the file was written by someone else (an agent through the transparent route, a terminal, another editor) since it was opened, the save is refused and offers "overwrite / load remote version / show difference" instead of overwriting silently; image preview, **document previews** (Markdown/HTML, SVG, CSV/TSV tables, PDF, Office converted to PDF by the host officeKit (remote LibreOffice fallback), audio/video; text sources offer source/preview switching); closing a tab, reloading and switching workspace all **ask first** when there are unsaved edits (a workspace switch clears every tab, so it asks); `Ctrl+S` works globally, even when the editor is not focused; **a page reload reopens the file tabs you had** (per workspace, at most 12; paths only, never contents; tabs that no longer open are skipped and counted; caret and scroll position are not restored); **Ctrl+G goes to a line** and **Ctrl+D selects the next occurrence of the selection**; **inline blame** (author + age; click the gutter cell to open that commit's details) and the file's **commit history** (`git log --follow`; click a row for that version's diff); **symbol outline** (`Ctrl+Shift+O`, language/indentation-based list of classes, functions and fields, click to jump) |
|
|
112
112
|
| 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 |
|
|
113
113
|
| 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 |
|
|
114
114
|
| Find | In-editor `Ctrl+F` (`Aa` / `ab_` / `.*`, `3/17` count, ↑↓, `F3`/`Shift+F3`, `Esc`); **selected text is carried into the box by `Ctrl+F`**; the widget is pinned to the top-right and does not scroll away; the `n/N` count refreshes on `F3`, clicks and caret moves |
|
|
@@ -129,7 +129,7 @@ extra configuration is needed.
|
|
|
129
129
|
| 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); **a save goes through a side file and a rename** (server-side `posix-rename` when available, otherwise backup-rename-rollback), **writes through symlinks** (the link itself survives) and keeps the mode bits **on a best-effort basis**; SCM status parsing unquotes git's C-quoted paths (any name with whitespace is quoted) |
|
|
130
130
|
| Remote terminal | ssh2 PTY + WebSocket, xterm rendering (copy-paste/theme-follow/reconnect-on-refresh; **the selection highlight is a visible blue in the light theme** — `#add6ff` light / `#264f78` dark, plus unfocused variants — no more white-on-white); `Shift+Insert` / `Ctrl+Shift+V` **paste exactly once** (xterm calls the key hook for keyup too, so the gesture used to run twice); **a reattach only takes over, it does not resize** (a page reload no longer shrinks a running shell to 80×24), and no resize frame is sent when rows/columns did not change; an output backlog applies real backpressure to the far end, and output within a short window is **coalesced into one frame** (flushed immediately past 64 KiB, and always before the exit frame) **Ctrl+click a path** reveals its folder in the directory tree (absolute / `~/` / relative tokens containing `/`, validated by stat in cwd → workspace-root → home order); a **"snippets" panel** next to the title stores name+command pairs, a click pastes into the command line **without Enter**, `Ctrl+B` adds one, and rows can be edited, deleted and dragged (Alt+Up/Down too), persisted in localStorage; echo after idle is flushed immediately, the client output path does not wait on xterm render callbacks, a closing socket releases its unsettled backpressure bytes, and the marks are 2 MiB / 512 KiB. so a busy command (`cat` of a large log, `dmesg`) costs far fewer frames and JSON parses; the terminal dials **its own SSH connection** per host (+1 connection, shared one as fallback) so bulk SFTP/git traffic no longer queues ahead of terminal I/O; **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 |
|
|
131
131
|
| 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 |
|
|
132
|
-
| Monitor | A sidebar **"Monitor"** page samples one host or every host **only while the panel and the page are visible**, at the configured refresh interval (5 s by default; 5/10/30 s in its settings): CPU, memory, disk, load, network rate, temperature and uptime, with 60-point history curves plus manual refresh and pause. The scope is "current host / a named host / all hosts" and survives a reload. The **first sample reports CPU% and the network rate as unknown** (both are deltas and need a second sample), and a non-Linux host shows unknown instead of 0. The Host caches one sample per alias for 3 seconds and joins concurrent requests, so one sample uses one exec channel and never the port-forward budget. Samples live in memory only — nothing is written to disk |
|
|
132
|
+
| Monitor | A sidebar **"Monitor"** page samples one host or every host **only while the panel and the page are visible**, at the configured refresh interval (5 s by default; 5/10/30 s in its settings): CPU, memory, disk, load, network rate, temperature and uptime, with 60-point history curves plus manual refresh and pause. The scope is "current host / a named host / all hosts" and survives a reload. The **first sample reports CPU% and the network rate as unknown** (both are deltas and need a second sample), and a non-Linux host shows unknown instead of 0. The Host caches one sample per alias for 3 seconds and joins concurrent requests, so one sample uses one exec channel and never the port-forward budget. Samples live in memory only — nothing is written to disk. A **process section** (single host, collapsed by default, sampled only while expanded) shows a `ps` snapshot sorted by CPU/memory/PID, filterable by command/user/PID, with a confirmed **End** action per row; a PID must come from the latest snapshot, and a host without a usable `ps` says it cannot enumerate. |
|
|
133
133
|
| 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; **directory / multi-selection archive downloads carry a 600 s server-side budget** (remote `timeout -k 3 600`; a host without GNU `timeout` falls back to the unbudgeted old behaviour) and fail with the real reason when it expires |
|
|
134
134
|
| Git graph | Remote repo status + branches + SVG commit graph + commit details/contents/diff pane (exec + frontend parsing, zero Host additions) |
|
|
135
135
|
| Import | One-click import from `~/.ssh/config` and from an existing `dsh-ssh.json` (read once, no coupling); `Host a b` multi-pattern entries are expanded one by one, `Include` is reported as not expanded instead of being silently dropped, and every skipped host names an actionable reason (no User / no IdentityFile / invalid port …) |
|
|
@@ -233,7 +233,7 @@ dsh_remote_vs/
|
|
|
233
233
|
├── vendor/dsh-remote-helpers/ # helper seeds (shipped, seeded into cache at startup, see below)
|
|
234
234
|
├── docs/ # local-only working docs (only docs/media/ screenshots ship)
|
|
235
235
|
│ ├── MAINTENANCE.md # local-only (.gitignore), not shipped: upgrade impact, checklist, pitfalls, release
|
|
236
|
-
│ ├── VERSION-HISTORY.md # local-only: per-release change log (0.7.1 → 0.
|
|
236
|
+
│ ├── VERSION-HISTORY.md # local-only: per-release change log (0.7.1 → 0.27.0)
|
|
237
237
|
│ └── GATES.md # local-only: local gate inventory and measured assertion counts
|
|
238
238
|
├── locale/ # bilingual plugin metadata
|
|
239
239
|
└── lib/ # build output (**must be committed**; only .map is ignored; restart after link install)
|
|
@@ -317,13 +317,6 @@ when the seat changes.
|
|
|
317
317
|
frames and JSON parses for a busy command, always flushed before the exit frame); a session is kept for **10 minutes** after its last socket goes away before the remote shell is
|
|
318
318
|
closed (it used to be kept forever, so closing the browser left the shell holding an sshd session slot).
|
|
319
319
|
- **Known limits (stated honestly)**:
|
|
320
|
-
- **Occasional terminal hitches have three known sources**: (1) the PTY shares ONE SSH connection with SFTP / git / helper traffic — **now fixed for the PTY: it dials its own connection per host** (falling back to the shared one if the server refuses another), so bulk transfer no longer queues ahead of the terminal;
|
|
321
|
-
(2) while output is streaming, the echo of what you type is ordered after the output already produced
|
|
322
|
-
(that is every terminal; `Ctrl+C` still works because the input path is not blocked by output
|
|
323
|
-
backpressure); (3) heavy agent work blocking the host's event loop slows both directions. This round
|
|
324
|
-
fixed what is ours to fix: the client no longer waits on xterm's render callback, the host does not hold
|
|
325
|
-
a post-idle echo in the coalescing window, the backpressure marks are 2 MiB / 512 KiB, and a closing
|
|
326
|
-
socket releases its unsettled bytes. **The host-side part needs a `dsh web` restart.**
|
|
327
320
|
- There is **no public API to select the "remote editor" view**; the plugin can only click the shell's
|
|
328
321
|
own tab by its label and toasts a hint when that fails (`revealEditor()`).
|
|
329
322
|
- Untracked directories arrive as a **single `dir/` row**; clicking it **expands** the files inside
|
|
@@ -513,7 +506,7 @@ tsc, to the bundler and to jsdom — this fixture is the only place they reprodu
|
|
|
513
506
|
> exactly why "57 call sites" and "55 checks run" differ by 2).
|
|
514
507
|
|
|
515
508
|
The live-host regression is still `npx tsc -p tsconfig.scratch.json && node .spike/build/.spike/p2-router.js`.
|
|
516
|
-
Before touching anything for a new DSH release, read the local-only `docs/MAINTENANCE.md` (§2 coupling points, §3 checklist) — it is gitignored, so a clone will not have it. After any change (host half or client half) the mandatory steps are: `pnpm run build` → `node scripts/verify-lib.mjs` (entries present, committed and loadable) → restart `dsh web`; and before committing, run every local gate under `scripts/` (`node scripts/check-*.mjs`,
|
|
509
|
+
Before touching anything for a new DSH release, read the local-only `docs/MAINTENANCE.md` (§2 coupling points, §3 checklist) — it is gitignored, so a clone will not have it. After any change (host half or client half) the mandatory steps are: `pnpm run build` → `node scripts/verify-lib.mjs` (entries present, committed and loadable) → restart `dsh web`; and before committing, run every local gate under `scripts/` (`node scripts/check-*.mjs`, 77 of them at the time of writing, plus `verify-lib.mjs` and the shared TS loader `_ts-hook.mjs`).
|
|
517
510
|
|
|
518
511
|
## License
|
|
519
512
|
|
package/README.md
CHANGED
|
@@ -90,7 +90,7 @@ Host 转发(终端按 `__DSH_TRANSPORT__.streamBaseUrl` 解析地址),无
|
|
|
90
90
|
| 并排 Diff | 左右**严格等分** + 中间 gutter 逐 hunk 按钮 + **顶部横向滚动条**(一行很长也不会破坏对称)+ 行号钉在左侧,**只渲染视口内的行**(3000 行文件从 9000 个行容器降到约 174 个,滚动范围与整篇渲染完全一致);可切「变更前 / 变更后」,变更后可编辑并保存(保存写回工作树文件;超过 8MiB 的差异只读,避免把截断内容写回去) |
|
|
91
91
|
| 提交图 | SVG 分支/合并图;点选提交后,下方**可调高度 / 可全屏**的提交详情面板给出三个视图:**提交详情**(标题、作者、时间、完整哈希+复制、父提交、ref、正文、检出)、**内容**(改动文件按目录分组、可折叠、可过滤,单击看差异、右键或行尾按钮在编辑器中打开)、**差异**(默认只展开前约 1500 行、其余文件折叠;双行号、`+/−` 计数、自动换行、上一/下一个文件、复制文件补丁或整个补丁)。合并提交按**首父**展示(git 对 merge 默认不给文件列表) |
|
|
92
92
|
| AI 审查 | 单文件 diff 与**整个提交**都能一键把审查请求追加到对话草稿(**只预填,不自动发送**,发送前可自行修改):≤32 KiB 内嵌完整 diff;更大或被 2 MB 静默截断时改为「文件/提交信息 + 变更块头 + 自行 `git show`」的摘要式请求(2 MB diff 约几十万 token,硬塞没有意义);未跟踪/二进制文件只给路径让 AI 自行读取。入口:并排 diff 工具栏、提交详情「差异」工具栏;当前会话不在该远端工作区、或宿主没有可用的对话输入通道时按钮禁用并写明原因 |
|
|
93
|
-
| 多标签编辑器 | 打开/保存/重载、脏标记、多文件标签并存;**保存是原子的**(侧文件 + 重命名,写穿符号链接并保留权限位);**保存前校验远端基线**:文件在打开之后被别人(Agent 的透明路由、终端、另一个编辑器)改过时保存被拒绝,并给出「覆盖 / 载入远端版本 /
|
|
93
|
+
| 多标签编辑器 | 打开/保存/重载、脏标记、多文件标签并存;**保存是原子的**(侧文件 + 重命名,写穿符号链接并保留权限位);**保存前校验远端基线**:文件在打开之后被别人(Agent 的透明路由、终端、另一个编辑器)改过时保存被拒绝,并给出「覆盖 / 载入远端版本 / 查看差异」,不再静默覆盖;图片预览、**文档预览**(Markdown/HTML、SVG、CSV/TSV 表格、PDF、Office 经宿主 officeKit 转 PDF(失败回退远端 LibreOffice)、音视频;文本源支持源码/预览切换);**Ctrl+G 转到行**、**Ctrl+D 选中下一个相同文本**;关闭标签、重载、切工作区遇到未保存改动都会**先确认**(切工作区会清空全部标签,所以先问);`Ctrl+S` 全局生效,焦点不在编辑器里也能保存;**刷新页面后自动恢复上次打开的文件标签**(按工作区记,最多 12 个;只存路径不存内容,打不开的会跳过并提示数量;光标与滚动位置不恢复);**行内 blame**(作者 + 相对时间;点击行号旁格跳到该提交详情)与当前文件的**提交历史**(`git log --follow`,点条目看该版本的 diff);**符号大纲**(`Ctrl+Shift+O`,按语言/缩进生成类、方法、字段列表,点击跳转) |
|
|
94
94
|
| 悬浮编辑器 | 三个入口:文件树 / 搜索结果 / 源代码管理右键「在悬浮编辑器中打开」,以及**双击会话视图的「远程编辑器」标签**把当前编辑器整体浮出(同一套标签、预览、Diff、查找、改动标记,不是另写一个编辑器)。窗口可拖标题栏移动、拖八个边角缩放、最大化/还原、双击标题栏切换最大化;**最小化成一个可拖动的悬浮球**(球上有未保存脏点,点一下或按 Enter 恢复,拖动可换位置);`Ctrl+滚轮` 缩放编辑器字号;位置、大小、字号和球的位置跨刷新记住 |
|
|
95
95
|
| 语法高亮 | 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 语法着色(没有专用语法包),效果是关键字/字符串/注释正确、专有语法不细分 |
|
|
96
96
|
| 查找 | 编辑器内 `Ctrl+F`(`Aa`/`ab_`/`.*`、`3/17` 计数、↑↓、`F3`/`Shift+F3`、`Esc`);**选中文本按 `Ctrl+F` 直接填入**;查找框钉在右上角,滚动不带走;`n/N` 计数随 `F3`、点击和光标移动刷新 |
|
|
@@ -111,7 +111,7 @@ Host 转发(终端按 `__DSH_TRANSPORT__.streamBaseUrl` 解析地址),无
|
|
|
111
111
|
| 远端文件 | SFTP 浏览 / 读 / 写 / 新建 / 删除 / 改名。边界已加固:0 字节文件不再卡死,每个 SFTP 操作 60s 超时回收通道;**单个目录列表上限 20000 条**(按"目录在前、其余按名"排序后取前 20000,宿主日志说明——协议里没有"已截断"字段,界面上没有标记);**保存走侧文件 + 重命名**(优先服务端 `posix-rename`,不支持时备份-重命名-失败回滚),**写穿符号链接**(链接本身保留)并**尽力保留权限位**;SCM 状态解析会反解 git 的 C-quote 路径(凡名字含空格都会被加引号) |
|
|
112
112
|
| 远端终端 | ssh2 PTY + WebSocket,xterm 渲染(复制粘贴/主题跟随/刷新重连;**亮色主题下的选中高亮是可见的蓝底**(亮 `#add6ff` / 暗 `#264f78` + 失焦变体),不再是白底白字);`Shift+Insert` / `Ctrl+Shift+V` **只粘贴一次**(xterm 的按键钩子对 keyup 也会回调,此前同一个手势被处理两遍);**重新挂接只接管、不改尺寸**(刷新页面不会把运行中的 shell 缩成 80×24),行列没变化时不再发 resize 帧;**Ctrl+点击路径**在目录树里定位到该目录(绝对路径/`~/`/带 `/` 的相对路径,先按 shell 上报的 cwd、再按工作区根、最后按 home 逐个 stat 验证;路径不在任何工作区内会明确提示);**「常用指令」**面板(标题旁按钮)保存「指令名 + 指令内容」,点一条只粘贴到命令行**不发送**,`Ctrl+B` 快速新增,支持编辑/删除/拖拽排序(Alt+↑↓ 亦可),存在浏览器 localStorage;输入输出方面:**echo 走即时通道**(空闲后的第一段输出不等合并窗口)、一个短窗口内的输出**合并成一帧**(缓冲超过 64 KiB 立即刷、退出帧前必刷)、客户端输出**不依赖 xterm 的渲染回调**(渲染被节流时不再堵住后续输出)、socket 断开时释放未结算的背压字节(否则通道会被永久暂停),背压高水位 2 MiB / 低水位 512 KiB(在"内存有界"与"echo 延迟有界"之间取更偏交互的一侧);**终端独占一条 SSH 连接**(每主机 +1 条,握手失败回落共享连接),SFTP/git 的大流量不再排在终端输入输出前面;**单帧上限 1 MiB**,超过 64 Ki 字符的粘贴在客户端按码点分块发送,不再撑断连接 |
|
|
113
113
|
| 并发通道 | 每主机同时最多 **6 条**远端通道(不再撞远端 sshd 的 `MaxSessions`);第 7 个排队最多等 **30 秒**,超时明确报 `remote host <alias> is busy`,而不是无限堆连接 |
|
|
114
|
-
| 运行监控 | 侧栏「监控」页:**仅在面板可见且页面在前台时**按刷新设置(默认 5 秒,可改 5/10/30 秒)采样一台/全部主机的 CPU、内存、磁盘、负载、网络速率、温度与运行时长,带 60 点历史曲线、手动刷新与暂停;范围可选「当前主机 / 指定主机 / 全部主机」并跨刷新记住。**首帧 CPU% 与网络速率显示「未知」**(差分需要第二帧),Linux 之外的平台如实显示「未知」而不是 0;Host 侧按 alias 缓存 3
|
|
114
|
+
| 运行监控 | 侧栏「监控」页:**仅在面板可见且页面在前台时**按刷新设置(默认 5 秒,可改 5/10/30 秒)采样一台/全部主机的 CPU、内存、磁盘、负载、网络速率、温度与运行时长,带 60 点历史曲线、手动刷新与暂停;范围可选「当前主机 / 指定主机 / 全部主机」并跨刷新记住。**首帧 CPU% 与网络速率显示「未知」**(差分需要第二帧),Linux 之外的平台如实显示「未知」而不是 0;Host 侧按 alias 缓存 3 秒并合并并发请求,一次采样只占一条执行通道、不占端口转发预算;样本只在内存,不落盘。**进程分区**(单主机、默认折叠、展开才采样):`ps` 快照按 CPU/内存/PID 排序,可按命令/用户/PID 过滤,行尾「结束」先确认;PID 必须来自最近快照,`ps` 不可用时明确显示无法枚举 |
|
|
115
115
|
| 超时与进程清理 | 普通 git 命令默认 300s(设置可调);**网络动词(fetch/pull/push/sync)默认 20 分钟、上限 30 分钟**。exec 跑在独立会话里(`setsid --wait`),超时/取消都先发 TERM、**3 秒后升级 KILL**,连同子进程一起收掉;远端没有 `setsid --wait` 时探测一次即知,退回旧行为并在宿主日志里写明"超时可能没停掉远端命令";**目录/多选归档下载有 600 秒服务端预算**(远端 `timeout -k 3 600`;远端没有 GNU `timeout` 时退回无预算的旧行为),超时以真实原因失败 |
|
|
116
116
|
| Git 图谱 | 远端仓库状态 + 分支 + SVG 提交图 + 提交详情/内容/差异面板(exec + 前端解析,零 Host 增量)|
|
|
117
117
|
| 导入 | 从 `~/.ssh/config`、从现有 `dsh-ssh.json` 一键导入(只读一次,不耦合);`Host a b` 这类多模式条目会逐个展开,`Include` 如实报告为未展开,被跳过的主机会给出可操作原因(缺 User / 缺 IdentityFile / 端口非法等)|
|
|
@@ -215,7 +215,7 @@ dsh_remote_vs/
|
|
|
215
215
|
├── vendor/dsh-remote-helpers/ # helper 种子(随包发布,启动铺缓存,见下)
|
|
216
216
|
├── docs/ # 本地工作文档(不推送 GitHub;只有 docs/media/ 的截图随仓库公开)
|
|
217
217
|
│ ├── MAINTENANCE.md # 本地私有(.gitignore,不入库):升级影响面/检查清单/踩坑/发布流程
|
|
218
|
-
│ ├── VERSION-HISTORY.md # 本地私有:逐版本变更纪要(0.7.1 → 0.
|
|
218
|
+
│ ├── VERSION-HISTORY.md # 本地私有:逐版本变更纪要(0.7.1 → 0.27.0)
|
|
219
219
|
│ └── GATES.md # 本地私有:本地门禁清单与实跑条数
|
|
220
220
|
├── locale/ # 插件元信息双语
|
|
221
221
|
└── lib/ # 构建产物(**必须入库**,只有 .map 忽略;link 安装后重启即生效)
|
|
@@ -281,10 +281,6 @@ dsh_remote_vs/
|
|
|
281
281
|
socket 全断开后
|
|
282
282
|
会话保留 **10 分钟**,超时才关闭远端 shell(以前是永不回收,关掉浏览器后远端 shell 一直占着 sshd 会话槽)。
|
|
283
283
|
- **已知边界(诚实说明)**:
|
|
284
|
-
- **终端的偶发卡顿有三个已知来源**:① ~~同一条 SSH 连接被 SFTP/git/helper 大流量占满~~ —— 已改为**PTY 独占一条 SSH 连接**(每主机一条;被拒绝时回落到共享连接),SFTP/git 的大流量不再排在终端前面;② 正在刷屏时,输入的回显必须排在已产生的输出
|
|
285
|
-
之后(所有终端都如此,`Ctrl+C` 仍有效——输入路径不受输出背压影响);③ 宿主事件循环被 agent 的
|
|
286
|
-
重活占住时,终端的收发会一起变慢。本轮已把可控部分修掉:客户端不再等渲染回调、宿主 echo 不等
|
|
287
|
-
合并窗口、背压水位降到 2 MiB/512 KiB、socket 断开释放未结算字节。**宿主侧改动需重启 `dsh web`**。
|
|
288
284
|
- 切到「远程编辑器」标签**没有公开 API**,插件只能按标签文字点击外壳自己的 tab,失败时给 toast
|
|
289
285
|
提示手动切(`revealEditor()`);
|
|
290
286
|
- 未跟踪目录在状态里是**一行**(`dir/`),点它**展开**该目录里的文件(只发一条限定路径的
|
|
@@ -450,7 +446,7 @@ node .spike/letter-check.mjs # 状态字母:未跟踪 ? 与冲突 U 不再
|
|
|
450
446
|
> 失败时才触发,所以「调用点 57」与「跑出来 55」本来就该差 2)。
|
|
451
447
|
|
|
452
448
|
真机回归仍是 `npx tsc -p tsconfig.scratch.json && node .spike/build/.spike/p2-router.js`。
|
|
453
|
-
DSH 发新版时先读本地维护文档 `docs/MAINTENANCE.md`(§2 逐项耦合点 + §3 升级清单)再动手;该文件被 .gitignore,克隆仓库的人看不到。改动后(无论 host 半还是 client 半)的必做动作是:`pnpm run build` → `node scripts/verify-lib.mjs`(核对 `lib/` 齐全、已入库、能加载)→ 重启 `dsh web`,提交前把 `scripts/` 下的本地门禁逐个跑一遍(`node scripts/check-*.mjs`,当前
|
|
449
|
+
DSH 发新版时先读本地维护文档 `docs/MAINTENANCE.md`(§2 逐项耦合点 + §3 升级清单)再动手;该文件被 .gitignore,克隆仓库的人看不到。改动后(无论 host 半还是 client 半)的必做动作是:`pnpm run build` → `node scripts/verify-lib.mjs`(核对 `lib/` 齐全、已入库、能加载)→ 重启 `dsh web`,提交前把 `scripts/` 下的本地门禁逐个跑一遍(`node scripts/check-*.mjs`,当前 77 个;另有 `verify-lib.mjs` 与共享 TS 加载器 `_ts-hook.mjs`)。
|
|
454
450
|
|
|
455
451
|
## 开源许可
|
|
456
452
|
|
package/THIRD-PARTY-NOTICES.md
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
`dsh-remote-vs` 自身以 MIT 许可发布(见 [LICENSE](./LICENSE))。本文件列出**随发行包分发**或**由本包声明依赖**的
|
|
4
4
|
第三方组件、版权人与许可证,并说明许可证全文的获取位置。
|
|
5
5
|
|
|
6
|
-
口径(2026-11-
|
|
6
|
+
口径(2026-11-25,插件 `0.27.0`;按 `package.json`、`pnpm-lock.yaml` 与 `node_modules` 实际版本核对):
|
|
7
7
|
|
|
8
8
|
- **内联** = 该包的代码被构建进本包产物。宿主半(`lib/index.js`、`lib/p2-*.js`)按 `tsdown.config.ts` 的
|
|
9
9
|
`noExternal: ['ssh2']` 打包(`cpu-features` 与 `sshcrypto.node` 保持 external,纯 JS 路径才是实际发布形态);
|
|
@@ -47,12 +47,17 @@
|
|
|
47
47
|
| `@deepseek-ai/dsh-fs-ssh` | 0.2.2-rc.5(精确 pin) | MIT(DSH 项目) | 见 npm 包内 `LICENSE` |
|
|
48
48
|
| `@deepseek-ai/schemastery` | 3.19.0(精确 pin) | MIT(DSH 项目) | 见 npm 包内 `LICENSE` |
|
|
49
49
|
|
|
50
|
-
## 4.
|
|
50
|
+
## 4. 由宿主提供的平台依赖(不随本包分发)
|
|
51
51
|
|
|
52
52
|
`react`、`react-dom`(MIT,`Copyright (c) Facebook, Inc. and its affiliates.`)与其余 `@deepseek-ai/*`
|
|
53
53
|
(`cordis`、`dsh-*`;DSH 以 MIT 发布)由 DSH 宿主提供,本包只声明 peer、不打包其代码;§3 里的三个
|
|
54
54
|
`@deepseek-ai/*` 是本包的**运行期依赖**(非 peer),由 npm 随包安装、同样不内联。
|
|
55
55
|
|
|
56
|
+
`@deepseek-ai/dsh-client-ui-primitives`(`0.2.2-rc.5`,MIT,`Copyright (c) 2026 DeepSeek`)是
|
|
57
|
+
**客户端平台模块表提供的组件**(Markdown 预览使用其 `MarkdownText`):本包只在 `devDependencies`
|
|
58
|
+
声明它以便类型检查/构建,客户端构建按 external 解析,不内联、也不随本包安装;运行时由 DSH web shell
|
|
59
|
+
的模块表提供。
|
|
60
|
+
|
|
56
61
|
`vendor/` 下的 helper 种子由 DeepSeek Harness 源码(MIT)按 `dsh-v0.2.2-rc.4` tag 用官方脚本构建,并内嵌
|
|
57
62
|
Node.js 运行时(MIT);构建流程与两处偏离见 README「Helper 自编译」。
|
|
58
63
|
|