dsh-remote-vs 0.29.0 → 0.30.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 +14 -3
- package/README.md +10 -3
- package/lib/client.js +264 -88
- package/lib/index.js +821 -127
- package/lib/p2-router-fs.js +1 -1
- package/lib/types/changes/recorder.d.ts +65 -10
- package/lib/types/changes/status.d.ts +48 -3
- package/lib/types/client/ConnectionsSection.d.ts +73 -0
- package/lib/types/client/api.d.ts +41 -2
- package/lib/types/client/scm/actions.d.ts +25 -1
- package/lib/types/p2/helper-rpc.d.ts +48 -0
- package/lib/types/p2/worlds.d.ts +28 -0
- package/lib/types/pool.d.ts +245 -10
- package/lib/types/protocol.d.ts +96 -0
- package/lib/{worlds-RG8K5eom.js → worlds-CRRZMZhg.js} +85 -6
- package/package.json +1 -1
- package/src/changes/recorder.ts +151 -15
- package/src/changes/status.ts +59 -4
- package/src/client/ConnectionsSection.tsx +359 -0
- package/src/client/MonitorView.tsx +14 -0
- package/src/client/api.ts +72 -4
- package/src/client/i18n.ts +50 -2
- package/src/client/scm/actions.ts +63 -12
- package/src/client/vsc/vsc.css +176 -0
- package/src/p2/helper-rpc.ts +73 -5
- package/src/p2/worlds.ts +48 -0
- package/src/pool.ts +736 -111
- package/src/protocol.ts +100 -0
- package/src/routes.ts +66 -0
package/README.en.md
CHANGED
|
@@ -119,8 +119,8 @@ extra configuration is needed.
|
|
|
119
119
|
| Push pipeline | Remote arch/OS probe → version compare → skip-if-same / else push; the executable channel pushes a self-built helper. A failed deploy no longer retries on every remote file operation: it backs off from **5 seconds up to 5 minutes**, and the Settings "Push" button forces an immediate retry; **an automatic push (first contact or upgrade self-heal) raises a bottom-right toast on success** (`alias: pushed remote helper <version>`), while a manual push stays quiet (Settings already shows its state) |
|
|
120
120
|
| 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) |
|
|
121
121
|
| 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 |
|
|
122
|
-
| Concurrent channels |
|
|
123
|
-
| 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. |
|
|
122
|
+
| Concurrent channels | The shared connection counts by purpose: **4** exec channels + **2** network-verb channels (fetch/pull/push) + **3** git-command channels (status/diff/log, the ledger's scans, and local writes such as commit/stage) = **9 counted**; one session is deliberately left free for the transient capability probe / group kill, so the total stays inside the measured `MaxSessions` (10) — a **bounded design, not spare headroom** (that one slot moved from exec to git: several workspaces/repositories scanning at once is more common than concurrent exec, at the cost of exec dropping from five to four — the fifth concurrent exec queues instead of being refused); a surplus operation queues for up to **30 seconds** (instead of being refused hard by sshd, which looks like a broken host) and then fails with `remote host <alias> is busy`. File transfer, terminals and port forwards ride their own connections and never take any of those 9 |
|
|
123
|
+
| 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. An **SSH connections section** (collapsed by default, sampled only while expanded) shows, per host, the four connection kinds (shared / terminals / port forwards / file transfer) as "open or closed · N channels", with the route the shared connection **actually took** on that line (direct / HTTP or SOCKS5 proxy / jump host, the same wording the connection chip uses); below it one line per channel budget, **each with its own queue**: `Shared channels 3/4 · 0 queued`, then — when the Host reports them — `File-transfer channels 1/6 · 0 queued`, `Network-verb channels 2/2 · 1 queued` (git fetch/pull/push) and `Git-command channels 2/3 · 1 queued` (git status/diff/log, the session ledger's own scans, and local writes such as commit/stage). At most four lines, and a line appears only while that budget has something running or waiting. The **helper** (the p2 transport) keeps its own SSH connection too: when the Host reports it, one more lane follows the four pool kinds — `Helper` with `open · 1 ch · 3 calls in flight` — and that last part is the number of RPC calls in flight, **not a queue**, so it never adds to the queue badge, the summary's queued count or the ordering. A Host that cannot report the helper omits the lane entirely rather than claiming "closed". **The host this workspace is bound to always leads**, then a host with work queued (which shows its queue count); the rest keep a stable alias order. Numbers are tabular so a refresh does not make the text jump. When a host refused its own SFTP connection and file operations fall back to the shared one, the file-transfer lane says so under it (`sftpFallback`, not an error state). The data is a local read of the pool the Host already holds in memory (no remote command rides it); a Host that does not know the route leaves the header plus one muted line. |
|
|
124
124
|
| 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 |
|
|
125
125
|
| Git graph | Remote repo status + branches + SVG commit graph + commit details/contents/diff pane (exec + frontend parsing, zero Host additions) |
|
|
126
126
|
| 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 …) |
|
|
@@ -259,6 +259,7 @@ dsh_remote_vs/
|
|
|
259
259
|
│ ├── ai-review.ts # AI review prompt builder (single diff / whole commit, byte tiers, pure)
|
|
260
260
|
│ ├── api.ts # typed fetch wrapper over /api/dsh-remote
|
|
261
261
|
│ ├── MonitorView.tsx # monitor panel (one/all hosts, curves, pause/refresh, persisted scope)
|
|
262
|
+
│ ├── ConnectionsSection.tsx # monitor SSH pool section (four kinds/channels/slots+queues/actual egress; no sampling while collapsed)
|
|
262
263
|
│ ├── metrics-model.ts # monitor model (history window/sparkline geometry/capacity+rate formatting)
|
|
263
264
|
│ ├── HostsView / WorkspacesView / WorkspaceWizard / TerminalView / XTerm / PortsView / Dialog
|
|
264
265
|
│ ├── SettingsHosts.tsx # settings occupants (host mgmt/binding list/default egress, self-fetching)
|
|
@@ -268,7 +269,7 @@ dsh_remote_vs/
|
|
|
268
269
|
├── vendor/dsh-remote-helpers/ # helper seeds (shipped, seeded into cache at startup, see below)
|
|
269
270
|
├── docs/ # local-only working docs (only docs/media/ screenshots ship)
|
|
270
271
|
│ ├── MAINTENANCE.md # local-only (.gitignore), not shipped: upgrade impact, checklist, pitfalls, release
|
|
271
|
-
│ ├── VERSION-HISTORY.md # local-only: per-release change log (0.7.1 → 0.
|
|
272
|
+
│ ├── VERSION-HISTORY.md # local-only: per-release change log (0.7.1 → 0.30.0)
|
|
272
273
|
│ └── GATES.md # local-only: local gate inventory and measured assertion counts
|
|
273
274
|
├── locale/ # bilingual plugin metadata
|
|
274
275
|
└── lib/ # build output (**must be committed**; only .map is ignored; restart after link install)
|
|
@@ -372,6 +373,10 @@ when the seat changes.
|
|
|
372
373
|
`/proc`, so other platforms show unknown; temperature exists only when the host exposes a thermal
|
|
373
374
|
zone (many VMs do not); CPU% and the network rate are deltas, so the **first frame is unknown**;
|
|
374
375
|
samples live in memory only and the curves restart after a page reload.
|
|
376
|
+
- **Pool section limits**: sampled only while the section is expanded, the Monitor panel is the visible
|
|
377
|
+
view AND the page is in the foreground (collapsed means zero requests and zero traffic); it reads the
|
|
378
|
+
connection state the Host holds in memory, never a remote command; a Host that does not know the route
|
|
379
|
+
(404) leaves the header plus one muted line and is not asked again.
|
|
375
380
|
|
|
376
381
|
## Session change review (Cursor style)
|
|
377
382
|
|
|
@@ -382,6 +387,12 @@ change?". Its data comes from the plugin's own change ledger (`/api/dsh-remote/c
|
|
|
382
387
|
`workspaceChanges` — the latter cannot see a routed session at all (the probe measured 58 remote sessions
|
|
383
388
|
with zero change events).
|
|
384
389
|
|
|
390
|
+
- **How new files are found**: the untracked scan first runs a cheap `git ls-files --others --directory`
|
|
391
|
+
(an untracked directory is reported once instead of being walked file by file, which is what made this step
|
|
392
|
+
expensive on a monorepo), then expands only the reported directories **within bounds** (one batched command for all of them, so a directory holding nothing visible costs no round trip; at most 20 directories,
|
|
393
|
+
the same 500-row cap, one 60-second budget shared with the walk). Hitting any limit — or an expansion failing —
|
|
394
|
+
marks the list **incomplete** and says so in the panel instead of silently listing fewer files; with no
|
|
395
|
+
untracked directory it runs **no extra command at all**.
|
|
385
396
|
- **The panel**: one row per file (file-type icon + relative path + `+a −b` on the right), aligned left and
|
|
386
397
|
right with the composer card; click the header to collapse/expand, `⟳` forces an immediate rescan. With no
|
|
387
398
|
changes it says "this session has not changed any file yet"; when it cannot compute, it states the
|
package/README.md
CHANGED
|
@@ -104,8 +104,8 @@ Host 转发(终端按 `__DSH_TRANSPORT__.streamBaseUrl` 解析地址),无
|
|
|
104
104
|
| 推送流水线 | 远端 arch/系统探测 → 版本比对 → 一致跳过 / 否则推送;executable 通道推送自编译 helper。失败后不再每次远端文件操作都重试:按 **5 秒起步、上限 5 分钟**的退避重试,设置页「推送」按钮可强制立即重试;**首次连接或协议自愈触发的自动推送成功后,右下角弹一条提示**(`alias:已自动推送远端 helper <版本>`),手动推送不弹(设置页已有状态) |
|
|
105
105
|
| 远端文件 | SFTP 浏览 / 读 / 写 / 新建 / 删除 / 改名。边界已加固:0 字节文件不再卡死,每个 SFTP 操作 60s 超时回收通道;**单个目录列表上限 20000 条**(按"目录在前、其余按名"排序后取前 20000,宿主日志说明——协议里没有"已截断"字段,界面上没有标记);**保存走侧文件 + 重命名**(优先服务端 `posix-rename`,不支持时备份-重命名-失败回滚),**写穿符号链接**(链接本身保留)并**尽力保留权限位**;SCM 状态解析会反解 git 的 C-quote 路径(凡名字含空格都会被加引号) |
|
|
106
106
|
| 远端终端 | 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 字符的粘贴在客户端按码点分块发送,不再撑断连接 |
|
|
107
|
-
| 并发通道 |
|
|
108
|
-
| 运行监控 | 侧栏「监控」页:**仅在面板可见且页面在前台时**按刷新设置(默认 5 秒,可改 5/10/30 秒)采样一台/全部主机的 CPU、内存、磁盘、负载、网络速率、温度与运行时长,带 60 点历史曲线、手动刷新与暂停;范围可选「当前主机 / 指定主机 / 全部主机」并跨刷新记住。**首帧 CPU% 与网络速率显示「未知」**(差分需要第二帧),Linux 之外的平台如实显示「未知」而不是 0;Host 侧按 alias 缓存 3 秒并合并并发请求,一次采样只占一条执行通道、不占端口转发预算;样本只在内存,不落盘。**进程分区**(单主机、默认折叠、展开才采样):`ps` 快照按 CPU/内存/PID 排序,可按命令/用户/PID 过滤,行尾「结束」先确认;PID 必须来自最近快照,`ps`
|
|
107
|
+
| 并发通道 | 共享连接上按用途分开计数:**4 条**执行通道 + **2 条**网络命令通道(fetch/pull/push)+ **3 条 git 命令通道**(status/diff/log 与账本扫描、以及 commit/stage 等本地写)= **9 条计入上限**,另留 1 条给瞬时的能力探测/组 kill,合计不超过远端 sshd 实测的 `MaxSessions`(10)——**这是有界设计,不是余量**(这 1 个名额是从执行通道挪给 git 的:多工作区/多仓库同时扫描比并发 exec 更常见,代价是执行通道从 5 降到 4,第 5 个并发 exec 会排队而不是被拒);超出的操作排队最多等 **30 秒**(而不是被 sshd 硬拒,那会看起来像主机坏了),超时明确报 `remote host <alias> is busy`。文件传输、终端、端口转发各走自己的连接,不占这 9 条 |
|
|
108
|
+
| 运行监控 | 侧栏「监控」页:**仅在面板可见且页面在前台时**按刷新设置(默认 5 秒,可改 5/10/30 秒)采样一台/全部主机的 CPU、内存、磁盘、负载、网络速率、温度与运行时长,带 60 点历史曲线、手动刷新与暂停;范围可选「当前主机 / 指定主机 / 全部主机」并跨刷新记住。**首帧 CPU% 与网络速率显示「未知」**(差分需要第二帧),Linux 之外的平台如实显示「未知」而不是 0;Host 侧按 alias 缓存 3 秒并合并并发请求,一次采样只占一条执行通道、不占端口转发预算;样本只在内存,不落盘。**进程分区**(单主机、默认折叠、展开才采样):`ps` 快照按 CPU/内存/PID 排序,可按命令/用户/PID 过滤,行尾「结束」先确认;PID 必须来自最近快照,`ps` 不可用时明确显示无法枚举。**SSH 连接分区**(默认折叠、展开才采样):每台主机四类连接(共享 / 终端 / 端口转发 / 文件传输)各显示「开着或未开 · N 通道」,共享那一行附带这条连接**实际走的路**(直连 / HTTP 或 SOCKS5 代理 / 跳板,与连接 chip 同一套文案);下一行起是**通道预算与排队**,每个预算一行、**各自独立排队**:共享 `共享通道 3/4 · 排队 0`;宿主报告时再加 `文件传输通道 1/6 · 排队 0`、`网络命令通道 2/2 · 排队 1`(git fetch/pull/push)与 `git 命令通道 2/3 · 排队 1`(git status/diff/log 与会话账本扫描,以及 commit/stage/discard 等本地写)——**最多四行**,且只在对应预算有活跃或排队时出现。此外,**helper(p2 传输)走自己的 SSH 连接**:宿主报告时在四类连接之后再出一行 `helper 工具`(`开着 · 1 通道 · 3 个调用进行中`),括号外那半句是在飞 RPC 调用数——**不是队列**,所以它不计入排队徽标、摘要排队数与排序;宿主拿不到 helper 状态时整行不出现(不谎报「未开」)。**当前工作区绑定的主机始终排最前**,其次排队 >0 的主机(并标出排队数),其余按 alias 稳定排序;数字等宽,刷新不跳。主机拒绝专用 SFTP 连接、文件操作回落到共享连接时,「文件传输」行下方标出原因(读 `sftpFallback`,不是错误态)。数据是宿主对自己内存里连接池的一次本地读取(不发远端命令),宿主版本不认识该接口时只留标题 + 一行说明 |
|
|
109
109
|
| 超时与进程清理 | 普通 git 命令默认 300s(设置可调);**网络动词(fetch/pull/push/sync)默认 20 分钟、上限 30 分钟**。exec 跑在独立会话里(`setsid --wait`),超时/取消都先发 TERM、**3 秒后升级 KILL**,连同子进程一起收掉;远端没有 `setsid --wait` 时探测一次即知,退回旧行为并在宿主日志里写明"超时可能没停掉远端命令";**目录/多选归档下载有 600 秒服务端预算**(远端 `timeout -k 3 600`;远端没有 GNU `timeout` 时退回无预算的旧行为),超时以真实原因失败 |
|
|
110
110
|
| Git 图谱 | 远端仓库状态 + 分支 + SVG 提交图 + 提交详情/内容/差异面板(exec + 前端解析,零 Host 增量)|
|
|
111
111
|
| 导入 | 从 `~/.ssh/config`、从现有 `dsh-ssh.json` 一键导入(只读一次,不耦合);`Host a b` 这类多模式条目会逐个展开,`Include` 如实报告为未展开,被跳过的主机会给出可操作原因(缺 User / 缺 IdentityFile / 端口非法等)|
|
|
@@ -236,6 +236,7 @@ dsh_remote_vs/
|
|
|
236
236
|
│ ├── ai-review.ts # AI 审查 prompt 构造(单文件 diff / 整提交,按字节分级,纯函数)
|
|
237
237
|
│ ├── api.ts # /api/dsh-remote 类型化 fetch 封装
|
|
238
238
|
│ ├── MonitorView.tsx # 监控面板(单机/全部主机、曲线、暂停/刷新、范围持久化)
|
|
239
|
+
│ ├── ConnectionsSection.tsx # 监控页 SSH 连接池分区(四类连接/通道数/槽位排队/实际出口;折叠即零采样)
|
|
239
240
|
│ ├── metrics-model.ts # 监控纯模型(历史窗口/Sparkline 几何/容量与速率格式化)
|
|
240
241
|
│ ├── HostsView / WorkspacesView / WorkspaceWizard / TerminalView / XTerm / PortsView / Dialog
|
|
241
242
|
│ ├── SettingsHosts.tsx # 设置两节 occupant(主机管理/绑定列表/默认网络出口,自取数)
|
|
@@ -245,7 +246,7 @@ dsh_remote_vs/
|
|
|
245
246
|
├── vendor/dsh-remote-helpers/ # helper 种子(随包发布,启动铺缓存,见下)
|
|
246
247
|
├── docs/ # 本地工作文档(不推送 GitHub;只有 docs/media/ 的截图随仓库公开)
|
|
247
248
|
│ ├── MAINTENANCE.md # 本地私有(.gitignore,不入库):升级影响面/检查清单/踩坑/发布流程
|
|
248
|
-
│ ├── VERSION-HISTORY.md # 本地私有:逐版本变更纪要(0.7.1 → 0.
|
|
249
|
+
│ ├── VERSION-HISTORY.md # 本地私有:逐版本变更纪要(0.7.1 → 0.30.0)
|
|
249
250
|
│ └── GATES.md # 本地私有:本地门禁清单与实跑条数
|
|
250
251
|
├── locale/ # 插件元信息双语
|
|
251
252
|
└── lib/ # 构建产物(**必须入库**,只有 .map 忽略;link 安装后重启即生效)
|
|
@@ -331,6 +332,8 @@ dsh_remote_vs/
|
|
|
331
332
|
- **监控的边界**:采样只在「监控」面板可见且页面在前台时进行(隐藏即完全停止,不产生远端流量);完整指标来自 Linux `/proc`,
|
|
332
333
|
其它平台显示「未知」;温度只在主机暴露 thermal zone 时有值(很多虚拟机没有);CPU% 与网络速率是两帧差分,**首帧为未知**;
|
|
333
334
|
样本只进内存,刷新页面后曲线从头开始。
|
|
335
|
+
- **连接池分区的边界**:采样同样只在「分区已展开 + 面板可见 + 页面在前台」时进行(折叠即零请求,不产生任何流量);
|
|
336
|
+
它读的是宿主内存里的连接状态,不发远端命令;宿主版本不认识该接口(404)时只留标题与一行说明,之后不再重复请求。
|
|
334
337
|
|
|
335
338
|
## 会话改动审阅(Cursor 式)
|
|
336
339
|
|
|
@@ -340,6 +343,10 @@ dsh_remote_vs/
|
|
|
340
343
|
会话改动账本(`/api/dsh-remote/changes`),不是 DSH 的 `workspaceChanges` —— 后者看不见被路由的会话
|
|
341
344
|
(探针实测:58 个远端会话、0 个改动事件)。
|
|
342
345
|
|
|
346
|
+
- **新文件怎么扫**:未跟踪文件先跑一次 `git ls-files --others --directory` 的**快走**(遇到未跟踪目录只报目录、
|
|
347
|
+
不再逐个下潜,monorepo 上省掉整趟遍历),再只对报出来的目录做**有界展开**(一条批量命令问全部目录,空目录不花往返;最多 20 个目录、累计文件仍受
|
|
348
|
+
500 行上限、与快走共用一个 60 秒预算);超限/超时/展开失败会把列表标成**不完整**并在面板说明,不会静默少列。
|
|
349
|
+
没有未跟踪目录时这一步**不发任何额外命令**。
|
|
343
350
|
- **面板**:一行一个文件(文件类型图标 + 相对路径 + 右侧 `+a −b`),宽度与输入卡**左右对齐**;
|
|
344
351
|
点标题栏折叠/展开,`⟳` 强制立即重扫。没有改动时显示「本会话还没有改动文件。」;统计不出来时显示
|
|
345
352
|
**具体原因**(见下面的边界),不会丢一个空列表让人猜。
|