dsh-remote-vs 0.24.0 → 0.26.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 +50 -16
- package/README.md +40 -15
- package/THIRD-PARTY-NOTICES.md +188 -0
- package/lib/client.js +6512 -77887
- package/lib/index.js +1461 -1024
- package/lib/p2-router-fs.js +1 -1
- package/lib/types/client/CodeEditor.d.ts +25 -0
- package/lib/types/client/EditorPane.d.ts +16 -5
- package/lib/types/client/FloatingPlaceholder.d.ts +16 -5
- package/lib/types/client/RemoteEditorView.d.ts +13 -10
- package/lib/types/client/RemoteExplorer.d.ts +53 -0
- package/lib/types/client/RemoteRoot.d.ts +5 -5
- package/lib/types/client/TerminalSnippets.d.ts +36 -0
- package/lib/types/client/TerminalView.d.ts +1 -1
- package/lib/types/client/XTerm.d.ts +33 -0
- package/lib/types/client/api.d.ts +37 -2
- package/lib/types/client/changes/review-state.d.ts +19 -0
- package/lib/types/client/connection.d.ts +16 -0
- package/lib/types/client/editor-capability.d.ts +27 -0
- package/lib/types/client/i18n.d.ts +1 -1
- package/lib/types/client/request-gate.d.ts +110 -0
- package/lib/types/client/scm/DiffView.d.ts +45 -7
- package/lib/types/client/scm/actions.d.ts +31 -3
- package/lib/types/client/store.d.ts +112 -4
- package/lib/types/client/terminal-input.d.ts +23 -0
- package/lib/types/client/terminal-snippets.d.ts +86 -0
- package/lib/types/client/vsc/FindWidget.d.ts +6 -0
- package/lib/types/client/vsc/breadcrumb.d.ts +30 -0
- package/lib/types/client/vsc/change-marks.d.ts +16 -6
- package/lib/types/client/vsc/editor-caret.d.ts +32 -0
- package/lib/types/client/vsc/editor-keymap.d.ts +35 -1
- package/lib/types/client/vsc/editor-langs.d.ts +9 -0
- package/lib/types/client/vsc/editor-settings.d.ts +55 -0
- package/lib/types/client/vsc/image-preview.d.ts +36 -0
- package/lib/types/client/vsc/kit.d.ts +13 -0
- package/lib/types/client/vsc/save-shortcut.d.ts +21 -0
- package/lib/types/client/vsc/terminal-clipboard.d.ts +15 -0
- package/lib/types/client/vsc/terminal-line.d.ts +25 -0
- package/lib/types/client/vsc/terminal-links.d.ts +62 -0
- package/lib/types/client/vsc/terminal-theme.d.ts +48 -0
- package/lib/types/client/vsc/terminal-writer.d.ts +52 -0
- package/lib/types/forward.d.ts +12 -0
- package/lib/types/fs-ops.d.ts +42 -0
- package/lib/types/http.d.ts +2 -0
- package/lib/types/keygen.d.ts +9 -0
- package/lib/types/monitor.d.ts +8 -0
- package/lib/types/notices.d.ts +16 -1
- package/lib/types/p2/helper-rpc.d.ts +45 -0
- package/lib/types/pool.d.ts +25 -0
- package/lib/types/routes.d.ts +2 -0
- package/lib/types/store.d.ts +7 -0
- package/lib/types/terminal.d.ts +33 -1
- package/lib/types/view-settings.d.ts +5 -0
- package/lib/{worlds-B7gEDBzC.js → worlds-RG8K5eom.js} +113 -15
- package/package.json +2 -1
- package/src/client/CodeEditor.tsx +205 -10
- package/src/client/DirectoryFlow.tsx +16 -0
- package/src/client/DoctorPanel.tsx +70 -7
- package/src/client/EditorPane.tsx +545 -118
- package/src/client/FloatingPlaceholder.tsx +34 -5
- package/src/client/HostsView.tsx +12 -3
- package/src/client/RemoteDirectoryPicker.tsx +12 -0
- package/src/client/RemoteEditorView.tsx +14 -11
- package/src/client/RemoteExplorer.tsx +929 -40
- package/src/client/RemoteRoot.tsx +167 -147
- package/src/client/SearchView.tsx +8 -0
- package/src/client/TerminalSnippets.tsx +432 -0
- package/src/client/TerminalView.tsx +50 -1
- package/src/client/XTerm.tsx +228 -58
- package/src/client/api.ts +106 -13
- package/src/client/auto-open-remote.ts +11 -9
- package/src/client/changes/ChangesDock.tsx +188 -6
- package/src/client/changes/changes.css +10 -3
- package/src/client/changes/review-state.ts +34 -0
- package/src/client/connection.ts +29 -0
- package/src/client/downloads.ts +49 -4
- package/src/client/editor-capability.ts +42 -0
- package/src/client/i18n.ts +228 -12
- package/src/client/index.tsx +22 -6
- package/src/client/request-gate.ts +221 -0
- package/src/client/scm/CommitPane.tsx +20 -2
- package/src/client/scm/DiffView.tsx +343 -117
- package/src/client/scm/HistoryPanel.tsx +23 -2
- package/src/client/scm/RepoPicker.tsx +1 -1
- package/src/client/scm/ScmPanel.tsx +391 -87
- package/src/client/scm/actions.ts +95 -12
- package/src/client/store.tsx +537 -22
- package/src/client/terminal-input.ts +44 -0
- package/src/client/terminal-snippets.ts +216 -0
- package/src/client/ui.tsx +4 -0
- package/src/client/vsc/FindWidget.tsx +24 -9
- package/src/client/vsc/breadcrumb.tsx +339 -0
- package/src/client/vsc/change-marks.ts +93 -44
- package/src/client/vsc/editor-caret.ts +30 -0
- package/src/client/vsc/editor-keymap.ts +59 -1
- package/src/client/vsc/editor-langs.ts +20 -0
- package/src/client/vsc/editor-settings.ts +146 -0
- package/src/client/vsc/editor-theme.ts +4 -5
- package/src/client/vsc/file-icons.tsx +17 -3
- package/src/client/vsc/image-preview.tsx +110 -0
- package/src/client/vsc/kit.tsx +46 -10
- package/src/client/vsc/save-shortcut.ts +47 -1
- package/src/client/vsc/terminal-clipboard.ts +19 -0
- package/src/client/vsc/terminal-line.ts +101 -0
- package/src/client/vsc/terminal-links.ts +166 -0
- package/src/client/vsc/terminal-theme.ts +97 -0
- package/src/client/vsc/terminal-writer.ts +112 -0
- package/src/client/vsc/vsc.css +1078 -181
- package/src/forward.ts +47 -9
- package/src/fs-ops.ts +124 -4
- package/src/git-ops.ts +20 -3
- package/src/http.ts +35 -4
- package/src/keygen.ts +55 -4
- package/src/monitor.ts +13 -0
- package/src/notices.ts +23 -1
- package/src/p2/helper-rpc.ts +113 -7
- package/src/p2/worlds.ts +14 -1
- package/src/pool.ts +99 -27
- package/src/routes.ts +212 -43
- package/src/sftp.ts +51 -14
- package/src/store.ts +10 -0
- package/src/terminal.ts +225 -24
- package/src/view-settings.ts +50 -10
- package/lib/types/client/Dialog.d.ts +0 -14
- package/src/client/Dialog.tsx +0 -76
package/README.en.md
CHANGED
|
@@ -8,10 +8,11 @@ SSH host management inside the DSH Host process + helper push pipeline + a **VS
|
|
|
8
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 / port forwarding). Hosts live in DSH Settings ("Remote hosts"); with `dsh-better-sidebar` installed
|
|
10
10
|
there is an extra standalone "Remote Workspace" tab, otherwise it falls back to a native right-Sidebar "Remote Workspace"
|
|
11
|
-
page (same content, self-opened from the guide, per-session instances). The editor is
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
11
|
+
page (same content, self-opened from the guide, per-session instances). **The sidebar's editor is the DEFAULT
|
|
12
|
+
seat**: opening a file switches the whole column to it (one view at a time, no tree/editor split) and closing
|
|
13
|
+
the last file returns to the directory. The conversation view slot is registered too, but as the OPTIONAL
|
|
14
|
+
full-width seat — the editor's own expand/dock button moves the same buffer between the two. Since P2, native
|
|
15
|
+
tools inside remote workspaces transparently run remotely (see below).
|
|
15
16
|
|
|
16
17
|
```text
|
|
17
18
|
┌─ Local DSH Host ─────────────────────────┐
|
|
@@ -98,22 +99,22 @@ extra configuration is needed.
|
|
|
98
99
|
|
|
99
100
|
| Capability | Notes |
|
|
100
101
|
| --- | --- |
|
|
101
|
-
| Explorer | Lazy tree + one click expands/collapses a directory + hidden-files toggle; **new: a 150 ms hover prefetches** that folder's listing (the expand paints from cache and revalidates in the background; if the prefetch is still in flight, the click waits for it and shows the loading line like a cold directory). On the Host every browse request shares **one long-lived SFTP session**, cutting a listing from two round trips to one (**the first one after a cold start or after the 2 idle minutes still pays the channel open**); context menu: new / rename / delete / copy / move / paste / find in folder / insert `@` reference / **download to local** (files stream to this machine; a directory **or a multi-selection** is archived on the remote host as one `.tar.gz` and streamed, so nothing is buffered in Host memory; a native **Save as** dialog picks the destination when the browser supports it, otherwise the browser's download folder; a bottom-right **download panel** shows live progress, allows cancel, and reports completion/failure; the search-hit menu offers it too; a download ends in one of three honest states — **saved / handed to the browser / failed** — and a hand-off never reads as "done", nor does a Host failure get saved as a file; the tree's empty area has its own context menu (new / upload / paste) and uploads, pastes and drops are **serialized** (a second transfer is refused with an explanation); the tree is keyboard-operable (`↑↓` move, `←→` collapse/expand, `Enter` open, `Shift+F10` menu) and dialogs trap focus and close on `Esc`); git status colours and folder roll-up marks; **type-coloured file and folder icons** (coloured sheet + category mark, amber folders that open, same set as the local sidebar; the tree only — other lists keep the neutral glyph); **drag-hover expand**: while dragging a row or dropping OS files, resting the pointer on a collapsed directory for ~650 ms opens it (spring-loaded folder, so the drop lands inside the folder you just revealed; cancelling the drag leaves nothing half-open) |
|
|
102
|
+
| Explorer | Lazy tree + one click expands/collapses a directory + hidden-files toggle; **new: a 150 ms hover prefetches** that folder's listing (the expand paints from cache and revalidates in the background; if the prefetch is still in flight, the click waits for it and shows the loading line like a cold directory). On the Host every browse request shares **one long-lived SFTP session**, cutting a listing from two round trips to one (**the first one after a cold start or after the 2 idle minutes still pays the channel open**); context menu: new / rename / delete / copy / move / paste / find in folder / insert `@` reference / **download to local** (files stream to this machine; a directory **or a multi-selection** is archived on the remote host as one `.tar.gz` and streamed, so nothing is buffered in Host memory; a native **Save as** dialog picks the destination when the browser supports it, otherwise the browser's download folder; a bottom-right **download panel** shows live progress, allows cancel, and reports completion/failure; the search-hit menu offers it too; a download ends in one of three honest states — **saved / handed to the browser / failed** — and a hand-off never reads as "done", nor does a Host failure get saved as a file; the tree's empty area has its own context menu (new / upload / paste) and uploads, pastes and drops are **serialized** (a second transfer is refused with an explanation); the tree is keyboard-operable (`↑↓` move, `←→` collapse/expand, `Enter` open, `Shift+F10` menu) and dialogs trap focus and close on `Esc`); git status colours and folder roll-up marks; **type-coloured file and folder icons** (coloured sheet + category mark, amber folders that open, same set as the local sidebar; the tree only — other lists keep the neutral glyph); **drag-hover expand**: while dragging a row or dropping OS files, resting the pointer on a collapsed directory for ~650 ms opens it (spring-loaded folder, so the drop lands inside the folder you just revealed; cancelling the drag leaves nothing half-open); **multi-select delete** runs as one remote `rm` batch (per-item progress and cancel, no per-file SFTP round trips for a large tree), re-lists only the deleted entries' parents and refreshes git status in the background; **very large directories render only the rows near the viewport** while keeping the full scroll range; a directory's context menu can **open it in a terminal** |
|
|
102
103
|
| Transfer speed | Uploads/downloads use a **256 KiB × 32 in-flight window** over SSH (pipelined SFTP): single-file downloads and drag-and-drop uploads run ~8× faster than one stream, and the helper push (47 MB) uses parallel `fastPut` too; large uploads are no longer killed by a 60 s deadline (progress watchdog instead). A **download above 4 MiB gets a second dedicated SFTP channel** (one SSH channel caps its window at 2 MiB, so each extra channel adds a window): an interleaved same-process A/B measured **about 1.1–1.4×** (medians of 1.08–1.43× across samples, link-dependent; raw read probes 1.6–1.8× — the product opens two channels, not four); small files keep one channel and one less channel slot, and uploads stay single-channel (the remote write path is the bound, extra channels gain nothing) |
|
|
103
104
|
| 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; **content mode can be aborted** (changing or clearing the query kills the running remote `grep`; an older Host without the streaming route degrades to a one-shot, non-cancellable query), success with stderr warnings is reported above the results, and a **directory** hit in name mode is revealed in the tree instead of being opened as a file |
|
|
104
105
|
| Connection status and offline read-only | The top bar and the editor info bar show the current workspace's SSH link state (**connection OK / connection issue / ready, connects on demand**): a drop is no longer silent — open editor tabs keep their cached content and turn **read-only** (saves are blocked with an explanation), the tree keeps showing cached directories while background refreshes stay quiet, and uncached directories say they are offline. When the link recovers, directories, git status, **unmodified file tabs and read-only diff tabs** refresh automatically (tabs with unsaved edits are left alone and the user is told). An errored link is retried at most three times, 30 s apart, then the chip is a manual retry control. While the link is down, "Undo this change" and the diff's hunk actions are blocked too; **a single operation's deadline is NOT treated as a broken link** — the chip stays ok and only that operation fails, with the real reason; when the link is down and the workspace has no cache, the SCM panel says it cannot read instead of sitting on "loading". **No cross-reload persistent cache** (remote source never lands on disk) — a deliberate privacy trade-off |
|
|
105
|
-
| 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) |
|
|
106
|
-
| 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 |
|
|
106
|
+
| 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); a non-repository workspace can **initialize a repository**, a branch can be **renamed**, and a remote URL can be **edited** (each behind a confirm/validation) |
|
|
107
|
+
| 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; the header can **show only unreviewed files** and **jump to the next unreviewed one** (wraps, never marks a file reviewed) |
|
|
107
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) |
|
|
108
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) |
|
|
109
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 |
|
|
110
|
-
| 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 preview (source vs preview); 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) |
|
|
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 preview (source vs preview); 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** |
|
|
111
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 |
|
|
112
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 |
|
|
113
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 |
|
|
114
115
|
| Quick open | `Ctrl+P` (`⌘+P` on macOS) jumps to a file by name instead of expanding directories one level at a time: the remote file index is fetched once (`rg --files` when available, `find` otherwise; **both caps are enforced on the remote side**, and a truncated listing says so — "index truncated, only the first N files are searchable" — instead of pretending to be complete), filtered locally by a subsequence scorer (consecutive matches, the file-name segment and word boundaries carry weight; ties break on path order so the list never reshuffles). The first screen is your recently opened files. The index lives **in memory only**, stores paths and never contents, and is rebuilt after a save/upload/delete/rename/create; writes made by a terminal or an agent bypass that and come back on a page reload. The shortcut only takes over while the remote workbench is visible — a local chat page keeps the browser's own `Ctrl+P` |
|
|
115
116
|
| Jump | Clicking a search hit opens the file at that line, centres it and **lights the landing line** (fades after ~2.6s); repeat jumps in the same file work |
|
|
116
|
-
| Terminals | Tabbed multi-terminal (`+` to create, `✕`/middle-click to close behind a confirm), across hosts; session ids are persisted so a page refresh reattaches to the running shells, and a session is kept for **10 minutes after its last socket goes away** (enough for a refresh or a browser-tab switch) before the remote shell is closed; **a socket drop (as opposed to a shell exit) keeps the session and offers a one-click reattach** (the same session id reattaches, and the Host still reclaims it after the 10-minute TTL above), and only a real exit clears it |
|
|
117
|
+
| Terminals | Tabbed multi-terminal (`+` to create, `✕`/middle-click to close behind a confirm), across hosts; session ids are persisted so a page refresh reattaches to the running shells, and a session is kept for **10 minutes after its last socket goes away** (enough for a refresh or a browser-tab switch) before the remote shell is closed; **a socket drop (as opposed to a shell exit) keeps the session and offers a one-click reattach** (the same session id reattaches, and the Host still reclaims it after the 10-minute TTL above), and only a real exit clears it; a reattach **replays the recent output**, so switching sessions no longer leaves a blank terminal |
|
|
117
118
|
| Workspaces | Binding list + routing-mode dropdown + the dual-mode (local / remote) new-workspace wizard; **unbinding asks first** (sessions and history stay readable, new remote calls are refused) |
|
|
118
119
|
| View preferences | The two controls at the bottom of Settings → Remote hosts: **open the remote workspace for a new remote session** (off by default; only remote-workspace sessions trigger it, local sessions never do, it is decided once per session per page load, and a panel you close stays closed) and the **remote workspace width share** (45% by default, 20%–70%): when the plugin opens its “Remote Workspace” right-panel page, the column takes that share of the window width, and changing the share applies immediately while the panel is open. Both live host-side (`$DSH_HOME/dsh-remote-view.json`) so every window of the profile agrees |
|
|
119
120
|
| Port forwarding | A sidebar **"Ports"** page: lists the remote host's listening TCP ports (`ss`, falling back to `netstat`) and forwards any of them to a local port in one click, with the local URL for copying/opening. Manual rules ("remote address:port → local port, which may be auto-assigned") are supported too. **The local listener binds `127.0.0.1` only** (`ssh -L` semantics — never exposed to the LAN); each rule has its own channel budget and never consumes one of the six exec/SFTP slots. An SSH drop or the idle eviction does not kill the listener: the next local connection simply re-dials. Rules live in the browser (restored after a reload) and every one can be stopped; disabling the plugin, deleting the host, or unloading it releases the local ports. When the remote has neither `ss` nor `netstat`, or the probe times out or is interrupted, the panel says "cannot enumerate" instead of showing an empty list |
|
|
@@ -126,7 +127,7 @@ extra configuration is needed.
|
|
|
126
127
|
| Key bootstrap | One click generates a dedicated keypair on password hosts and deploys `authorized_keys`, key auth from then on |
|
|
127
128
|
| 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) |
|
|
128
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) |
|
|
129
|
-
| 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 |
|
|
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 |
|
|
130
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 |
|
|
131
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
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 |
|
|
@@ -232,7 +233,7 @@ dsh_remote_vs/
|
|
|
232
233
|
├── vendor/dsh-remote-helpers/ # helper seeds (shipped, seeded into cache at startup, see below)
|
|
233
234
|
├── docs/ # local-only working docs (only docs/media/ screenshots ship)
|
|
234
235
|
│ ├── MAINTENANCE.md # local-only (.gitignore), not shipped: upgrade impact, checklist, pitfalls, release
|
|
235
|
-
│ ├── 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.26.0)
|
|
236
237
|
│ └── GATES.md # local-only: local gate inventory and measured assertion counts
|
|
237
238
|
├── locale/ # bilingual plugin metadata
|
|
238
239
|
└── lib/ # build output (**must be committed**; only .map is ignored; restart after link install)
|
|
@@ -255,9 +256,25 @@ checking the build artifact). Both are covered under "Development".
|
|
|
255
256
|
|
|
256
257
|

|
|
257
258
|
|
|
258
|
-
Both surfaces share one state module (`store.tsx`): **the sidebar "Remote Workspace" page** (
|
|
259
|
-
`dsh-better-sidebar` is installed, otherwise the native right-Sidebar page
|
|
260
|
-
"remote editor" tab** (
|
|
259
|
+
Both surfaces share one state module (`store.tsx`): **the sidebar "Remote Workspace" editor page** (the default
|
|
260
|
+
seat — a standalone tab when `dsh-better-sidebar` is installed, otherwise the native right-Sidebar page; it owns
|
|
261
|
+
the whole column) and **the conversation-view "remote editor" tab** (the optional full-width seat next to
|
|
262
|
+
对话/轨迹). Only one of them is mounted at a time and the buffer, caret and scroll position are handed over
|
|
263
|
+
when the seat changes.
|
|
264
|
+
|
|
265
|
+
- **Editor chrome** (ported from the local sidebar plugin): an opaque VS Code Dark+/Light+ code surface
|
|
266
|
+
(`#1e1e1e` / `#ffffff`) with editor-panel tokens, a 30px tab strip (dirty dot, middle-click close, diff/image
|
|
267
|
+
glyphs), an info bar with reload / save / word-wrap / font A−A+ / float / seat switch, and — in the full-width
|
|
268
|
+
seat — a **clickable breadcrumb** (sibling-file picker over the remote listing route) plus a **status bar**
|
|
269
|
+
(language, line:column, selected characters, indent, wrap, font size, save state, UTF-8). Word wrap is one
|
|
270
|
+
shared preference persisted in localStorage (all seats); font size is shared by the docked and full-width
|
|
271
|
+
seats, while the floating window keeps its own per-window `Ctrl+wheel` zoom.
|
|
272
|
+
- **Image preview**: png/jpg/jpeg/gif/webp/bmp/ico/avif render in the tab with a click-to-toggle
|
|
273
|
+
fit/actual size and the file size plus pixel dimensions; a capped read says "image too large" instead of
|
|
274
|
+
drawing a broken thumbnail. SVG keeps opening as TEXT (editable) — it is markup, not a raster image.
|
|
275
|
+
- **Closing the last file returns to the directory**: the editor page hands the column back to the explorer
|
|
276
|
+
(a dirty tab still asks first). A diff tab carries one extra icon: **switch to content editing**, opening the
|
|
277
|
+
same path as an editable content tab (commit drill-downs, deletions and binary diffs do not offer it).
|
|
261
278
|
|
|
262
279
|
- **Activity rail**: explorer / search / source control / commit graph / editor / terminal / workspaces.
|
|
263
280
|
A panel stays mounted after its first visit, so switching back neither refetches nor flashes. While it is
|
|
@@ -277,6 +294,9 @@ Both surfaces share one state module (`store.tsx`): **the sidebar "Remote Worksp
|
|
|
277
294
|
- **Editor**: tabs plus an info bar (path, language, **build stamp**, `tok N` coloured-token count,
|
|
278
295
|
saved state, reload/save). Those three marks exist for troubleshooting: the stamp answers "is the
|
|
279
296
|
browser running the bundle I just built?", `tok 0` answers "did a grammar match this extension?".
|
|
297
|
+
A **diff tab** carries one extra icon next to "reload the diff": **switch to content editing**, which opens
|
|
298
|
+
the same path as an editable content tab (working-tree / staged diffs; commit drill-downs do not offer it —
|
|
299
|
+
opening today's file from a historical blob would read as editing the commit).
|
|
280
300
|
- **Floating editor**: "Open in floating editor" from the file-tree / search-hit / source-control context
|
|
281
301
|
menus, or double-click the "remote editor" tab, lifts the editor into a window above the shell (same tabs
|
|
282
302
|
and buffers; closing or docking puts it back on its original surface). Drag the title bar, resize from the
|
|
@@ -291,9 +311,19 @@ Both surfaces share one state module (`store.tsx`): **the sidebar "Remote Worksp
|
|
|
291
311
|
- **Terminals**: tabbed sessions with the session id persisted one by one, so a page refresh reattaches
|
|
292
312
|
to the shells that are still running; **a reattach only takes over, it does not resize** (a live shell is
|
|
293
313
|
never shrunk to 80×24 — the true size comes from the one tab that can measure itself, sent as a `resize`
|
|
294
|
-
frame
|
|
314
|
+
frame, and no frame is sent when rows/columns did not change); the selection highlight is **readable in
|
|
315
|
+
both themes** (`#add6ff` light / `#264f78` dark, with dimmer unfocused variants) and `Shift+Insert` /
|
|
316
|
+
`Ctrl+Shift+V` insert exactly once; output within a short window is coalesced into one frame (far fewer
|
|
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
|
|
295
318
|
closed (it used to be kept forever, so closing the browser left the shell holding an sshd session slot).
|
|
296
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.**
|
|
297
327
|
- There is **no public API to select the "remote editor" view**; the plugin can only click the shell's
|
|
298
328
|
own tab by its label and toasts a hint when that fails (`revealEditor()`).
|
|
299
329
|
- Untracked directories arrive as a **single `dir/` row**; clicking it **expands** the files inside
|
|
@@ -411,6 +441,7 @@ Upstream never published helper binaries (all Release assets are empty), so this
|
|
|
411
441
|
## Security model
|
|
412
442
|
|
|
413
443
|
- All `/api/dsh-remote/*` routes are loopback + same-origin only.
|
|
444
|
+
- **Unavailable behind a remote Web UI (relay / tunnel)**: that fence only admits a loopback socket, a loopback `Host` header and a same-origin request, so opening the GUI through `ds-harness-remote` or a cloudflared tunnel makes every `/api/dsh-remote/*` route answer `403 forbidden: loopback-only` — the client shows a readable "plugin API is local-access-only" message instead of the raw phrase. This is the fence working, not a fault: open DSH in a browser on the local machine. SSH itself still works, because the Host dials out from there.
|
|
414
445
|
- Passwords / key passphrases are stored in plaintext in `dsh-remote.json` (0600) — same trust model as the existing SSH plugin.
|
|
415
446
|
- Pushed artifacts are sha256-verified both ways (tarball in, binary out); the helper install dir is separate from workspaces; the sidecar's `version`, platform and tarball path are whitelist-validated (no unvalidated string is interpolated into a remote shell line), and a failed install keeps the previous version.
|
|
416
447
|
- Host config writes are fsync'd and re-checked against a stamp (a concurrent Desktop/Web edit inside the read-modify-write window is replayed instead of silently overwritten).
|
|
@@ -482,12 +513,15 @@ tsc, to the bundler and to jsdom — this fixture is the only place they reprodu
|
|
|
482
513
|
> exactly why "57 call sites" and "55 checks run" differ by 2).
|
|
483
514
|
|
|
484
515
|
The live-host regression is still `npx tsc -p tsconfig.scratch.json && node .spike/build/.spike/p2-router.js`.
|
|
485
|
-
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`,
|
|
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`, 73 of them at the time of writing, plus `verify-lib.mjs` and the shared TS loader `_ts-hook.mjs`).
|
|
486
517
|
|
|
487
518
|
## License
|
|
488
519
|
|
|
489
520
|
MIT © 2026 xiray-xia — see [LICENSE](./LICENSE).
|
|
490
521
|
|
|
522
|
+
Third-party components bundled in or required by the published package are listed in
|
|
523
|
+
[THIRD-PARTY-NOTICES.md](./THIRD-PARTY-NOTICES.md).
|
|
524
|
+
|
|
491
525
|
The `vendor/` helper seed is built from DeepSeek Harness sources (MIT) at tag `dsh-v0.2.2-rc.4`
|
|
492
526
|
with the stock build script; see "Self-built helper" above for the exact procedure and the two
|
|
493
527
|
documented deviations (`glibc-ceiling.patch` and `ssh-helper-runtime-deps.patch` in the seed set).
|
package/README.md
CHANGED
|
@@ -8,8 +8,9 @@ Host 进程内的 SSH 主机管理 + helper 推送流水线 + **VS Code 式远
|
|
|
8
8
|
(资源管理器 / 搜索 / 源代码管理 / 提交图与提交详情面板 / 多标签编辑器 / 悬浮编辑器 / 并排 Diff / 多终端 / 端口转发)。
|
|
9
9
|
主机配在 DSH 设置里(“远程主机”项);装了 `dsh-better-sidebar` 时另有
|
|
10
10
|
独立“远程工作台”tab,没装则退到原生右侧栏“远程工作台”页(同内容,引导页自助开,per-session 实例)。
|
|
11
|
-
|
|
12
|
-
|
|
11
|
+
**侧栏「远程工作台」的编辑器是默认面**:打开文件即整栏切到编辑器,关闭最后一个文件自动回到目录,
|
|
12
|
+
外观对齐本地侧边栏插件(VS Code 不透明代码背景、标签条、信息栏、图片预览、查找/换行/字号)。
|
|
13
|
+
会话视图槽里的**远程编辑器**标签是可选的全宽面 —— 信息栏的展开按钮切过去、收回按钮切回来,两个面共用同一份缓冲区。
|
|
13
14
|
P2 起原生工具在远端工作区里透明跑远端(见下)。
|
|
14
15
|
|
|
15
16
|
```text
|
|
@@ -80,22 +81,22 @@ Host 转发(终端按 `__DSH_TRANSPORT__.streamBaseUrl` 解析地址),无
|
|
|
80
81
|
|
|
81
82
|
| 能力 | 说明 |
|
|
82
83
|
| --- | --- |
|
|
83
|
-
| 资源管理器 | 懒加载目录树 + 单击目录即展开/折叠 + 隐藏文件开关;**新增悬停 150 ms 预取**下一层列表(展开时先用缓存上屏、后台再校验;预取仍未返回时点开会等它,与冷启动一样显示加载行);Host 侧浏览请求复用**一条常驻 SFTP 会话**,一次列目录的往返从 2 个降到 1 个(**冷启动或空闲 2 分钟关闭后的第一次仍要开会话**);右键菜单:新建/改名/删除/复制/移动/粘贴/在此文件夹查找/插入 `@`
|
|
84
|
+
| 资源管理器 | 懒加载目录树 + 单击目录即展开/折叠 + 隐藏文件开关;**新增悬停 150 ms 预取**下一层列表(展开时先用缓存上屏、后台再校验;预取仍未返回时点开会等它,与冷启动一样显示加载行);Host 侧浏览请求复用**一条常驻 SFTP 会话**,一次列目录的往返从 2 个降到 1 个(**冷启动或空闲 2 分钟关闭后的第一次仍要开会话**);右键菜单:新建/改名/删除/复制/移动/粘贴/在此文件夹查找/插入 `@` 引用/**在终端中打开**/**下载到本地**(文件流式下载、目录或**多选**在远端打包成 `.tar.gz` 流式下载,不占 Host 内存;浏览器支持时先弹**另存为**对话框选保存路径,不支持时落到默认下载目录;右下角**下载面板**显示实时进度、可取消,并提示完成/失败;搜索结果右键同样支持;下载结果分「已保存 / 已交给浏览器 / 失败」三态,交给浏览器后**不再显示成已完成**,Host 失败也不会被当成文件存下;树空白区也有右键菜单(新建/上传/粘贴),上传、粘贴、拖放等写操作**串行**(另一个传输进行中会拒绝并提示);键盘可用(`↑↓` 选择、`←→` 折叠/展开、`Enter` 打开、`Shift+F10` 菜单),对话框有焦点陷阱与 `Esc` 关闭);**多选删除**一次远端 `rm` 批次完成(带逐项进度与取消,大目录不再逐文件 SFTP 往返)、只刷新被删除项的父目录并由后台补 git 状态;**超大目录只渲染视口附近的行**(滚动范围与整篇一致);git 状态色与文件夹聚合标记;**文件/目录按类型着色**(彩色纸张 + 类别标记、琥珀色目录开合,与本地侧栏同款;仅目录树,其它列表保持单色);**拖拽悬停展开**:拖动行或拖入系统文件时,指针在收起目录上停留约 650 ms 就自动展开该目录(spring-loaded folder,松手即落在已展开的目标里;中途取消不会留下自动展开) |
|
|
84
85
|
| 传输性能 | 上传/下载走 SSH 的 **256 KiB × 32 并发窗口**(ssh2 pipelined SFTP):单文件下载与拖放上传比单流快约 8 倍,helper 推送(47 MB 包)同样走并行 `fastPut`;大文件上传不再被 60 秒期限误杀(改用进度看门狗)。**大于 4 MiB 的下载再开一条专用 SFTP 通道**(单条 SSH 通道的窗口上限是 2 MiB,多一条通道多一个窗口):同进程交错 A/B 实测**约 1.1–1.4×**(多次采样中位 1.08–1.43×,随链路波动;原始读探针 1.6–1.8×,产品只开两条通道,不开四条);小文件不开第二条,省一个通道槽。上传保持单通道(服务端写入是瓶颈,多通道无收益) |
|
|
85
86
|
| 搜索 | 两档:**文件名**(远端 `find`)与**内容**(远端 `grep`)。内容档带范围目录、`Aa`(大小写)/`ab_`(全字)/`.*`(正则)、结果按文件分组、命中高亮,点条目跳到该行;**内容档可中止**(改写或清空查询会终止正在跑的远端 `grep`;老 Host 无流式路由时退化为不可取消的一次性查询),成功但远端给了 stderr 警告时在结果上方提示;文件名档里命中**目录**时在树中定位,而不是当文件打开 |
|
|
86
87
|
| 连接状态与离线只读 | 顶部栏与编辑器信息栏显示当前工作区的 SSH 连接状态(**连接正常 / 连接异常 / 就绪·按需连接**):断线不再静默——已打开的编辑器标签保留缓存内容并切为**只读**(保存被拦截并说明原因),目录树继续显示已缓存目录、后台刷新静默,未缓存目录显示离线提示;连接恢复后自动刷新目录、Git 状态、**未修改的文件标签和只读 diff 标签**(有未保存改动的标签不动并提示)。错误态不会无限重连:每 30 秒最多自动重试 3 次,之后点状态图标手动重试。断线时「撤销这处改动」和 diff 的 hunk 操作同样被拦截;**单次操作的超时(deadline)不当作链路故障**——chip 保持正常,只有该次操作失败并说明原因;断线且该工作区没有缓存时,SCM 面板直接说明无法读取,而不是停在「加载中」。**不做**跨页面刷新的持久化缓存(远端源码不落盘),这是有意的隐私取舍 |
|
|
87
|
-
| 源代码管理 | **仓库目录选择器**(工作区里的 git 在子目录时用:浏览远端目录、一键跳到工作区内发现的仓库、手输相对/绝对路径,并逐目录提示会落在哪个仓库);变更/暂存/未跟踪/忽略分桶,**未跟踪目录行可点击展开**,逐文件与**逐 hunk** 暂存/还原、丢弃(带确认)、提交;分支/远程/stash
|
|
88
|
-
| 会话改动审阅 | 输入框上方的**可收纳**面板,按**会话**列出改了什么(一行一个文件、文件类型图标、右侧 `+a −b
|
|
88
|
+
| 源代码管理 | **仓库目录选择器**(工作区里的 git 在子目录时用:浏览远端目录、一键跳到工作区内发现的仓库、手输相对/绝对路径,并逐目录提示会落在哪个仓库);变更/暂存/未跟踪/忽略分桶,**未跟踪目录行可点击展开**,逐文件与**逐 hunk** 暂存/还原、丢弃(带确认)、提交;分支/远程/stash 面板,**分支可重命名**、**远程可改 URL**、非仓库目录可直接**初始化仓库**(均需确认);同步(fetch/pull/push),**推送支持自定义 refspec**(如 Gerrit `HEAD:refs/for/<分支>`;留空 = 普通 `git push`,非空值会记住);fetch/pull/push/sync 有**实时输出面板**(SSE 流式显示 git/远端输出、运行计时、**可取消**(杀掉远端进程组)、完成后可复制完整输出;老 Host 无流式路由时自动回退到一次性结果) |
|
|
89
|
+
| 会话改动审阅 | 输入框上方的**可收纳**面板,按**会话**列出改了什么(一行一个文件、文件类型图标、右侧 `+a −b`);头部可**只看未审阅**并**跳到下一个未审阅**(回绕、不自动打 ✓);点文件在远程编辑器里打开并画**整行着色 + 行内字符级差异**,右上角 `n/N ↑↓` 跳改动点,悬浮改动行可**撤销**这处改动(远端 `git apply -R`)。详见下文「会话改动审阅」 |
|
|
89
90
|
| 并排 Diff | 左右**严格等分** + 中间 gutter 逐 hunk 按钮 + **顶部横向滚动条**(一行很长也不会破坏对称)+ 行号钉在左侧,**只渲染视口内的行**(3000 行文件从 9000 个行容器降到约 174 个,滚动范围与整篇渲染完全一致);可切「变更前 / 变更后」,变更后可编辑并保存(保存写回工作树文件;超过 8MiB 的差异只读,避免把截断内容写回去) |
|
|
90
91
|
| 提交图 | SVG 分支/合并图;点选提交后,下方**可调高度 / 可全屏**的提交详情面板给出三个视图:**提交详情**(标题、作者、时间、完整哈希+复制、父提交、ref、正文、检出)、**内容**(改动文件按目录分组、可折叠、可过滤,单击看差异、右键或行尾按钮在编辑器中打开)、**差异**(默认只展开前约 1500 行、其余文件折叠;双行号、`+/−` 计数、自动换行、上一/下一个文件、复制文件补丁或整个补丁)。合并提交按**首父**展示(git 对 merge 默认不给文件列表) |
|
|
91
92
|
| AI 审查 | 单文件 diff 与**整个提交**都能一键把审查请求追加到对话草稿(**只预填,不自动发送**,发送前可自行修改):≤32 KiB 内嵌完整 diff;更大或被 2 MB 静默截断时改为「文件/提交信息 + 变更块头 + 自行 `git show`」的摘要式请求(2 MB diff 约几十万 token,硬塞没有意义);未跟踪/二进制文件只给路径让 AI 自行读取。入口:并排 diff 工具栏、提交详情「差异」工具栏;当前会话不在该远端工作区、或宿主没有可用的对话输入通道时按钮禁用并写明原因 |
|
|
92
|
-
| 多标签编辑器 | 打开/保存/重载、脏标记、多文件标签并存;**保存是原子的**(侧文件 + 重命名,写穿符号链接并保留权限位);**保存前校验远端基线**:文件在打开之后被别人(Agent 的透明路由、终端、另一个编辑器)改过时保存被拒绝,并给出「覆盖 / 载入远端版本 / 查看差异」,不再静默覆盖;图片预览、Markdown/HTML
|
|
93
|
+
| 多标签编辑器 | 打开/保存/重载、脏标记、多文件标签并存;**保存是原子的**(侧文件 + 重命名,写穿符号链接并保留权限位);**保存前校验远端基线**:文件在打开之后被别人(Agent 的透明路由、终端、另一个编辑器)改过时保存被拒绝,并给出「覆盖 / 载入远端版本 / 查看差异」,不再静默覆盖;图片预览、Markdown/HTML 预览(源码/预览切换);**Ctrl+G 转到行**、**Ctrl+D 选中下一个相同文本**;关闭标签、重载、切工作区遇到未保存改动都会**先确认**(切工作区会清空全部标签,所以先问);`Ctrl+S` 全局生效,焦点不在编辑器里也能保存;**刷新页面后自动恢复上次打开的文件标签**(按工作区记,最多 12 个;只存路径不存内容,打不开的会跳过并提示数量;光标与滚动位置不恢复) |
|
|
93
94
|
| 悬浮编辑器 | 三个入口:文件树 / 搜索结果 / 源代码管理右键「在悬浮编辑器中打开」,以及**双击会话视图的「远程编辑器」标签**把当前编辑器整体浮出(同一套标签、预览、Diff、查找、改动标记,不是另写一个编辑器)。窗口可拖标题栏移动、拖八个边角缩放、最大化/还原、双击标题栏切换最大化;**最小化成一个可拖动的悬浮球**(球上有未保存脏点,点一下或按 Enter 恢复,拖动可换位置);`Ctrl+滚轮` 缩放编辑器字号;位置、大小、字号和球的位置跨刷新记住 |
|
|
94
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 语法着色(没有专用语法包),效果是关键字/字符串/注释正确、专有语法不细分 |
|
|
95
96
|
| 查找 | 编辑器内 `Ctrl+F`(`Aa`/`ab_`/`.*`、`3/17` 计数、↑↓、`F3`/`Shift+F3`、`Esc`);**选中文本按 `Ctrl+F` 直接填入**;查找框钉在右上角,滚动不带走;`n/N` 计数随 `F3`、点击和光标移动刷新 |
|
|
96
97
|
| 快速打开 | `Ctrl+P`(macOS `⌘+P`)按文件名直达,不用一层层展开目录:远端文件索引一次拉取(有 `rg` 用 `rg --files`,没有则回退 `find`;**在远端**就按条目数与字节数封顶,被截断会明确提示"索引已截断,仅可搜索前 N 个文件"而不是假装完整),本地子序列模糊匹配(连续匹配、文件名段、词边界加权,同分按路径稳定排序),首屏是最近打开。索引**只在内存**、只存路径不存内容、刷新即失效;保存/上传/删除/改名/新建之后下次打开自动重建(终端或 Agent 直接写远端不在失效范围内,刷新页面即可)。快捷键只在远端工作台可见时接管,本地会话保留浏览器自己的 `Ctrl+P` |
|
|
97
98
|
| 跳转 | 从搜索结果点进文件 → 跳到该行 + 垂直居中 + **落地行高亮**(约 2.6 秒后淡出);同文件反复跳都生效 |
|
|
98
|
-
| 多终端 | 标签式多终端(`+` 新建、`✕`/中键关闭带确认)、可跨主机;刷新页面按 session id
|
|
99
|
+
| 多终端 | 标签式多终端(`+` 新建、`✕`/中键关闭带确认)、可跨主机;刷新页面按 session id 自动重连回原会话,**重连时重放最近输出**(切换会话/重挂侧栏不再出现空白终端),**socket 全断开后会话保留 10 分钟**(够刷新、够切浏览器标签页接回),超时才关闭远端 shell;**socket 断开(而不是 shell 退出)时会话保留、可一键接回**(同一 session id 重连,Host 侧仍按上面 10 分钟 TTL 回收),只有真正退出才清会话 |
|
|
99
100
|
| 工作区 | 绑定列表 + 路由档位下拉 + 新建工作区双模向导(本地 / 远端);**解绑前确认**(会话与历史仍可读,新的远端调用会被拒绝) |
|
|
100
101
|
| 视图偏好 | 设置 → 远程主机页底部的两项:**新建的远程会话自动打开远程工作区**(默认关;只认远端工作区的会话,本机会话永不触发;每次页面加载对同一会话只判断一次,手动关掉的面板不会被重新打开)与**远程工作区占比**(默认 45%,20%–70%):插件打开右栏「远程工作台」页时,右侧面板按这个比例占窗口宽度;面板已打开时改占比立即生效。两项都存 Host 侧(`$DSH_HOME/dsh-remote-view.json`),同一 profile 的各窗口一致 |
|
|
101
102
|
| 端口转发 | 侧边栏「端口」页:列出远端监听端口(`ss`,没有则 `netstat`),对任一端口**一键转发到本地**、复制本地 URL、在浏览器打开;也支持手动「远端地址:端口 → 本地端口(可自动分配)」规则。**本地只监听 `127.0.0.1`**(`ssh -L` 语义,不暴露到局域网);每条转发有自己的通道预算,不占池里的 6 个执行/SFTP 通道;SSH 掉线或闲置回收后,下一条本地连接自动重拨而不影响监听;规则存浏览器(刷新后恢复),可逐条停止;关闭插件、删除主机、卸载插件都会释放本地端口。远端既没有 `ss` 也没有 `netstat`、或探测超时/中断时,明确显示「无法枚举」而不是空列表 |
|
|
@@ -108,7 +109,7 @@ Host 转发(终端按 `__DSH_TRANSPORT__.streamBaseUrl` 解析地址),无
|
|
|
108
109
|
| 密钥 bootstrap | 密码主机一键生成专用密钥对并下发 `authorized_keys`,之后走密钥 |
|
|
109
110
|
| 推送流水线 | 远端 arch/系统探测 → 版本比对 → 一致跳过 / 否则推送;executable 通道推送自编译 helper。失败后不再每次远端文件操作都重试:按 **5 秒起步、上限 5 分钟**的退避重试,设置页「推送」按钮可强制立即重试;**首次连接或协议自愈触发的自动推送成功后,右下角弹一条提示**(`alias:已自动推送远端 helper <版本>`),手动推送不弹(设置页已有状态) |
|
|
110
111
|
| 远端文件 | SFTP 浏览 / 读 / 写 / 新建 / 删除 / 改名。边界已加固:0 字节文件不再卡死,每个 SFTP 操作 60s 超时回收通道;**单个目录列表上限 20000 条**(按"目录在前、其余按名"排序后取前 20000,宿主日志说明——协议里没有"已截断"字段,界面上没有标记);**保存走侧文件 + 重命名**(优先服务端 `posix-rename`,不支持时备份-重命名-失败回滚),**写穿符号链接**(链接本身保留)并**尽力保留权限位**;SCM 状态解析会反解 git 的 C-quote 路径(凡名字含空格都会被加引号) |
|
|
111
|
-
| 远端终端 | ssh2 PTY + WebSocket,xterm
|
|
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 字符的粘贴在客户端按码点分块发送,不再撑断连接 |
|
|
112
113
|
| 并发通道 | 每主机同时最多 **6 条**远端通道(不再撞远端 sshd 的 `MaxSessions`);第 7 个排队最多等 **30 秒**,超时明确报 `remote host <alias> is busy`,而不是无限堆连接 |
|
|
113
114
|
| 运行监控 | 侧栏「监控」页:**仅在面板可见且页面在前台时**按刷新设置(默认 5 秒,可改 5/10/30 秒)采样一台/全部主机的 CPU、内存、磁盘、负载、网络速率、温度与运行时长,带 60 点历史曲线、手动刷新与暂停;范围可选「当前主机 / 指定主机 / 全部主机」并跨刷新记住。**首帧 CPU% 与网络速率显示「未知」**(差分需要第二帧),Linux 之外的平台如实显示「未知」而不是 0;Host 侧按 alias 缓存 3 秒并合并并发请求,一次采样只占一条执行通道、不占端口转发预算;样本只在内存,不落盘 |
|
|
114
115
|
| 超时与进程清理 | 普通 git 命令默认 300s(设置可调);**网络动词(fetch/pull/push/sync)默认 20 分钟、上限 30 分钟**。exec 跑在独立会话里(`setsid --wait`),超时/取消都先发 TERM、**3 秒后升级 KILL**,连同子进程一起收掉;远端没有 `setsid --wait` 时探测一次即知,退回旧行为并在宿主日志里写明"超时可能没停掉远端命令";**目录/多选归档下载有 600 秒服务端预算**(远端 `timeout -k 3 600`;远端没有 GNU `timeout` 时退回无预算的旧行为),超时以真实原因失败 |
|
|
@@ -214,7 +215,7 @@ dsh_remote_vs/
|
|
|
214
215
|
├── vendor/dsh-remote-helpers/ # helper 种子(随包发布,启动铺缓存,见下)
|
|
215
216
|
├── docs/ # 本地工作文档(不推送 GitHub;只有 docs/media/ 的截图随仓库公开)
|
|
216
217
|
│ ├── MAINTENANCE.md # 本地私有(.gitignore,不入库):升级影响面/检查清单/踩坑/发布流程
|
|
217
|
-
│ ├── VERSION-HISTORY.md # 本地私有:逐版本变更纪要(0.7.1 → 0.
|
|
218
|
+
│ ├── VERSION-HISTORY.md # 本地私有:逐版本变更纪要(0.7.1 → 0.26.0)
|
|
218
219
|
│ └── GATES.md # 本地私有:本地门禁清单与实跑条数
|
|
219
220
|
├── locale/ # 插件元信息双语
|
|
220
221
|
└── lib/ # 构建产物(**必须入库**,只有 .map 忽略;link 安装后重启即生效)
|
|
@@ -236,8 +237,9 @@ dsh_remote_vs/
|
|
|
236
237
|
|
|
237
238
|

|
|
238
239
|
|
|
239
|
-
两个挂载面共用一份状态(`store.tsx
|
|
240
|
-
|
|
240
|
+
两个挂载面共用一份状态(`store.tsx`):**右侧栏「远程工作台」的编辑器页**(默认面,装了 better-sidebar
|
|
241
|
+
走独立 tab,否则走原生右栏页;整栏显示,不与目录分栏)与**会话视图「远程编辑器」**(可选的全宽面,
|
|
242
|
+
与 对话/轨迹 并列)。同一时刻只挂载一个面,切换面时显式交接缓冲区与光标/滚动位置。
|
|
241
243
|
|
|
242
244
|
- **活动栏**:资源管理器 / 搜索 / 源代码管理 / 提交图 / 编辑器 / 终端 / 工作区;面板首次访问后
|
|
243
245
|
保持挂载,切回来不重新拉取、不闪。隐藏期间**不做远端工作**(目录列表、SCM 的 stash/分支/远程查询、
|
|
@@ -250,8 +252,18 @@ dsh_remote_vs/
|
|
|
250
252
|
手动刷新的结果一定晚于点击(排在后台读之后取最新结果),切走的读只写自己那份缓存、绝不上屏;后台读
|
|
251
253
|
失败保留原列表并显示原因,不会把工作区误判成"没有仓库"。刷新浏览器/重启 Host 后第一次切换仍要等
|
|
252
254
|
一次,这是有意的。
|
|
253
|
-
-
|
|
254
|
-
|
|
255
|
+
- **编辑器**:外观对齐本地侧边栏插件 —— VS Code Dark+/Light+ 的**不透明代码背景**(`#1e1e1e` / `#ffffff`)、
|
|
256
|
+
标签条(未保存圆点、中键关闭、diff/图片图标)、信息栏(路径、语言、**构建戳**、`tok N` 着色 token 数、
|
|
257
|
+
已保存状态、重载/保存/自动换行/字号 A−A+/悬浮/全宽切换)。会话区全宽面另带**可点面包屑**(同级文件下拉,
|
|
258
|
+
目录优先排序)与**状态栏**(语言、行:列、已选字符数、缩进、换行、字号、保存态、UTF-8)。
|
|
259
|
+
信息栏的构建戳与 `tok N` 是排障用的:构建戳判定"浏览器跑的是不是刚编的包",`tok 0` 判定语法包是否命中。
|
|
260
|
+
**diff 标签**的信息栏在「重新载入差异」旁多一个**切换为内容编辑**图标:一键把同一路径作为可编辑内容标签
|
|
261
|
+
打开(工作区/暂存 diff 有效;提交历史 drill-down 不显示——从历史 blob 打开"今天的文件"会被误读成编辑提交)。
|
|
262
|
+
自动换行与字号(含 `Ctrl+滚轮`)是跨面共享的本地偏好,**默认不换行**(与蓝本一致);悬浮窗内字号由浮窗
|
|
263
|
+
自身的缩放管理,所以 A−A+ 在浮窗里不显示。
|
|
264
|
+
- **图片预览**:png/jpg/jpeg/gif/webp/bmp/ico/avif 在编辑器里直接显示,点击切换「适应窗口 / 原始大小」,
|
|
265
|
+
并在下方给出大小与像素尺寸;读取被截断的图片明确提示过大而不是画一个破图。SVG 仍按文本打开(可编辑)。
|
|
266
|
+
- **关闭最后一个文件回到目录**:编辑器页没有打开的标签时自动切回资源管理器页;有未保存改动先确认。
|
|
255
267
|
- **悬浮编辑器**:文件树 / 搜索结果 / 源代码管理右键「在悬浮编辑器中打开」,或双击「远程编辑器」标签,
|
|
256
268
|
编辑器整体浮到页面最上层的窗口里(同一份标签与缓冲区,关闭/停靠后回原表面)。标题栏可拖动、八个边角
|
|
257
269
|
可缩放、可最大化/还原;**最小化成一个 44px 悬浮球**(不占整条标题栏,可拖到任意角落,单击/Enter 恢复,
|
|
@@ -260,9 +272,19 @@ dsh_remote_vs/
|
|
|
260
272
|
- **查找与跳转**:`Ctrl+F` 查找框固定右上角(`position: fixed` 锚定编辑器矩形,任何祖先滚动都不带走);
|
|
261
273
|
选中文本按 `Ctrl+F` 直接填入;从搜索结果跳转会**居中 + 落地行高亮**。
|
|
262
274
|
- **终端**:标签式多终端,session id 逐个持久化,刷新页面自动重连回原会话;**重连只接管、不改尺寸**
|
|
263
|
-
(活着的 shell 不会被缩成 80×24——真实尺寸由能测到自己的那个标签发 `resize`
|
|
275
|
+
(活着的 shell 不会被缩成 80×24——真实尺寸由能测到自己的那个标签发 `resize` 帧;行列没变不发帧);
|
|
276
|
+
选中高亮**明暗主题都可读**(亮 `#add6ff` / 暗 `#264f78`,失焦有更淡的变体),`Shift+Insert` /
|
|
277
|
+
`Ctrl+Shift+V` 只插入一次;一个短窗口内的输出合并成一帧(忙命令的帧数与 JSON 解析次数大幅下降,退出前必刷);
|
|
278
|
+
echo 不等合并窗口(空闲后的第一段输出立即发),客户端输出也不等 xterm 的渲染回调;
|
|
279
|
+
**Ctrl+点击路径**可在目录树里定位到对应目录;标题旁的**常用指令**面板支持新增/编辑/删除/拖拽排序,
|
|
280
|
+
点条目只粘贴不发送,`Ctrl+B` 快速新增;
|
|
281
|
+
socket 全断开后
|
|
264
282
|
会话保留 **10 分钟**,超时才关闭远端 shell(以前是永不回收,关掉浏览器后远端 shell 一直占着 sshd 会话槽)。
|
|
265
283
|
- **已知边界(诚实说明)**:
|
|
284
|
+
- **终端的偶发卡顿有三个已知来源**:① ~~同一条 SSH 连接被 SFTP/git/helper 大流量占满~~ —— 已改为**PTY 独占一条 SSH 连接**(每主机一条;被拒绝时回落到共享连接),SFTP/git 的大流量不再排在终端前面;② 正在刷屏时,输入的回显必须排在已产生的输出
|
|
285
|
+
之后(所有终端都如此,`Ctrl+C` 仍有效——输入路径不受输出背压影响);③ 宿主事件循环被 agent 的
|
|
286
|
+
重活占住时,终端的收发会一起变慢。本轮已把可控部分修掉:客户端不再等渲染回调、宿主 echo 不等
|
|
287
|
+
合并窗口、背压水位降到 2 MiB/512 KiB、socket 断开释放未结算字节。**宿主侧改动需重启 `dsh web`**。
|
|
266
288
|
- 切到「远程编辑器」标签**没有公开 API**,插件只能按标签文字点击外壳自己的 tab,失败时给 toast
|
|
267
289
|
提示手动切(`revealEditor()`);
|
|
268
290
|
- 未跟踪目录在状态里是**一行**(`dir/`),点它**展开**该目录里的文件(只发一条限定路径的
|
|
@@ -364,6 +386,7 @@ helper RPC(fs)/ ssh2(进程),本地一切不变;两者同 Host、共
|
|
|
364
386
|
## 安全模型
|
|
365
387
|
|
|
366
388
|
- 所有 `/api/dsh-remote/*` 路由仅限 loopback + 同源访问。
|
|
389
|
+
- **远程 Web 访问(中继 / 隧道)下插件不可用**:上面的围栏只认 loopback socket + loopback `Host` + 同源 Origin,经 `ds-harness-remote` 或 cloudflared 等隧道从公网打开 GUI 时,这些路由一律返回 `403 forbidden: loopback-only`——客户端把它显示为「插件 API 仅限本机访问」的可读提示,而不是英文原文。这是围栏生效而非故障,请在本机浏览器打开 DSH;SSH 能力本身由本机 Host 发起,不受影响。
|
|
367
390
|
- 密码 / 私钥口令以明文保存在 `dsh-remote.json`(0600),与现有 SSH 插件同一信任模型。
|
|
368
391
|
- 推送物逐包验 sha256(tarball 进、binary 出,双重校验);helper 安装目录与工作区分开;sidecar 的 `version`、平台与 tarball 路径都走白名单校验(不内插未校验字符串到远端 shell 行),安装失败会保留上一版。
|
|
369
392
|
- 主机配置写入走 fsync + 变更戳复核(读-改-写窗口内被别的进程改过会重放,而不是静默覆盖)。
|
|
@@ -427,12 +450,14 @@ node .spike/letter-check.mjs # 状态字母:未跟踪 ? 与冲突 U 不再
|
|
|
427
450
|
> 失败时才触发,所以「调用点 57」与「跑出来 55」本来就该差 2)。
|
|
428
451
|
|
|
429
452
|
真机回归仍是 `npx tsc -p tsconfig.scratch.json && node .spike/build/.spike/p2-router.js`。
|
|
430
|
-
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`,当前
|
|
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`,当前 73 个;另有 `verify-lib.mjs` 与共享 TS 加载器 `_ts-hook.mjs`)。
|
|
431
454
|
|
|
432
455
|
## 开源许可
|
|
433
456
|
|
|
434
457
|
MIT © 2026 xiray-xia —— 见 [LICENSE](./LICENSE)。
|
|
435
458
|
|
|
459
|
+
发行包内联/依赖的第三方组件与许可证见 [THIRD-PARTY-NOTICES.md](./THIRD-PARTY-NOTICES.md)。
|
|
460
|
+
|
|
436
461
|
`vendor/` 里的 helper 种子由 DeepSeek Harness 源码(MIT)按 `dsh-v0.2.2-rc.4`
|
|
437
462
|
tag 以官方原脚本构建,具体流程与两处有记录的偏离见上文"Helper 自编译"节
|
|
438
463
|
(种子包里的 `glibc-ceiling.patch` 与 `ssh-helper-runtime-deps.patch`)。
|
|
@@ -0,0 +1,188 @@
|
|
|
1
|
+
# 第三方组件与许可证(THIRD-PARTY NOTICES)
|
|
2
|
+
|
|
3
|
+
`dsh-remote-vs` 自身以 MIT 许可发布(见 [LICENSE](./LICENSE))。本文件列出**随发行包分发**或**由本包声明依赖**的
|
|
4
|
+
第三方组件、版权人与许可证,并说明许可证全文的获取位置。
|
|
5
|
+
|
|
6
|
+
口径(2026-11-23,插件 `0.25.0`;按 `package.json`、`pnpm-lock.yaml` 与 `node_modules` 实际版本核对):
|
|
7
|
+
|
|
8
|
+
- **内联** = 该包的代码被构建进本包产物。宿主半(`lib/index.js`、`lib/p2-*.js`)按 `tsdown.config.ts` 的
|
|
9
|
+
`noExternal: ['ssh2']` 打包(`cpu-features` 与 `sshcrypto.node` 保持 external,纯 JS 路径才是实际发布形态);
|
|
10
|
+
浏览器半(`lib/client.js`)除平台共享模块(`react`、`react-dom`、`cordis`、`@deepseek-ai/dsh-client-ui-*`)外全部内联。
|
|
11
|
+
- **安装** = 未内联,由 `package.json` 的 `dependencies` 在安装时放进 `node_modules/`,运行时加载。
|
|
12
|
+
- **宿主提供** = `peerDependencies`,由 DSH 宿主提供,不随本包分发。
|
|
13
|
+
- 内联进宿主产物的 ssh2 链**只存在于 `devDependencies`**(构建期内联),使用者安装本包后 `node_modules/` 里
|
|
14
|
+
不会有这些目录,因此正文直接给出其版权行,并在第 5 节附上许可证正文。
|
|
15
|
+
|
|
16
|
+
## 1. 内联进宿主产物(`lib/index.js`、`lib/p2-*.js`)
|
|
17
|
+
|
|
18
|
+
| 组件 | 版本 | 许可证 | 版权行(LICENSE 原文) |
|
|
19
|
+
|---|---|---|---|
|
|
20
|
+
| ssh2 | 1.17.0 | MIT | `Copyright Brian White. All rights reserved.` |
|
|
21
|
+
| asn1(ssh2 依赖) | 0.2.6 | MIT | `Copyright (c) 2011 Mark Cavage, All rights reserved.` |
|
|
22
|
+
| safer-buffer(asn1 依赖) | 2.1.2 | MIT | `Copyright (c) 2018 Nikita Skovoroda <chalkerx@gmail.com>` |
|
|
23
|
+
| bcrypt-pbkdf(ssh2 依赖) | 1.0.2 | BSD-3-Clause(`package.json`);LICENSE 同时含 bcrypt_pbkdf 与 Joyent 的 ISC 式条款 | `Copyright 1997 Niels Provos <provos@physnet.uni-hamburg.de>`、`Copyright (c) 2013 Ted Unangst <tedu@openbsd.org>`、`Copyright 2016, Joyent Inc` / `Author: Alex Wilson <alex.wilson@joyent.com>` |
|
|
24
|
+
| tweetnacl(bcrypt-pbkdf 依赖) | 0.14.5 | Unlicense(public domain) | 无版权行,正文见 5.3 |
|
|
25
|
+
|
|
26
|
+
## 2. 内联进浏览器产物(`lib/client.js`)
|
|
27
|
+
|
|
28
|
+
以下 41 个包全部为 MIT;版权行统一为“`Copyright (C) <年份> by Marijn Haverbeke <marijn@haverbeke.berlin> and others`”
|
|
29
|
+
一族,个别包的年份/邮箱/共同作者不同,逐包原文见其 `LICENSE`。
|
|
30
|
+
|
|
31
|
+
| 组件族 | 版本 | 许可证 | 版权行(原文要点) |
|
|
32
|
+
|---|---|---|---|
|
|
33
|
+
| `@codemirror/*`:autocomplete、commands、lang-cpp、lang-css、lang-go、lang-html、lang-java、lang-javascript、lang-json、lang-markdown、lang-python、lang-rust、lang-xml、lang-yaml、language、legacy-modes、search、state、streamparser、view | 6.x:autocomplete 6.20.3、commands 6.11.1、lang-cpp 6.0.3、lang-css 6.3.1、lang-go 6.0.1、lang-html 6.4.12、lang-java 6.0.2、lang-javascript 6.2.5、lang-json 6.0.2、lang-markdown 6.5.2、lang-python 6.2.1、lang-rust 6.0.2、lang-xml 6.1.0、lang-yaml 6.1.3、language 6.13.1、legacy-modes 6.5.3、search 6.5.11、state 6.7.6、streamparser 6.0.0、view 6.43.14 | MIT | `Copyright (C) 2018-2021`(lang-go、lang-yaml 为 `2024`)`by Marijn Haverbeke <marijn@haverbeke.berlin> and others` |
|
|
34
|
+
| `@lezer/*`:common、cpp、css、go、highlight、html、java、javascript、json、lr、markdown、python、rust、xml、yaml | common 1.5.3、cpp 1.1.6、css 1.3.9、go 1.0.1、highlight 1.2.3、html 1.3.13、java 1.1.5、javascript 1.5.6、json 1.0.3、lr 1.4.11、markdown 1.8.0、python 1.1.19、rust 1.0.3、xml 1.0.6、yaml 1.0.4 | MIT | `Copyright (C) <2018 或 2020> by Marijn Haverbeke <marijn@haverbeke.berlin> and others`;`@lezer/yaml` 写的是 `<marijnh@gmail.com>`;`@lezer/json` 还列 `Arun Srinivasan <rulfzid@gmail.com>` |
|
|
35
|
+
| `@xterm/xterm`、`@xterm/addon-fit` | 6.0.0、0.11.0 | MIT | `Copyright (c) 2017-2019, The xterm.js authors (https://github.com/xtermjs/xterm.js)`、`Copyright (c) 2014-2016, SourceLair Private Company`、`Copyright (c) 2012-2013, Christopher Jeffrey`;addon-fit 为 `Copyright (c) 2019, The xterm.js authors`。内联的 `xterm.css` 头部另保留经作者许可 fork 自 Fabrice Bellard jslinux vt100 的设计出处说明(`Copyright (c) 2011 Fabrice Bellard`) |
|
|
36
|
+
| style-mod、crelt、w3c-keyname、@marijn/find-cluster-break | 4.1.4、1.0.7、2.2.8、1.0.4 | MIT | 依次为 `Copyright (C) 2018 ... and others`、`Copyright (C) 2020`、`Copyright (C) 2016 ... and others`、`Copyright (C) 2024`,作者均为 Marijn Haverbeke |
|
|
37
|
+
|
|
38
|
+
注:`@codemirror/lint` 虽在依赖树里(由 `@codemirror/lang-javascript` 声明),但产物没有任何代码引用它,故未内联、不列入上表。
|
|
39
|
+
|
|
40
|
+
## 3. 运行期依赖(未内联,随包安装)
|
|
41
|
+
|
|
42
|
+
| 组件 | 版本 | 许可证 | 版权行(LICENSE 原文) |
|
|
43
|
+
|---|---|---|---|
|
|
44
|
+
| ws | 8.22.0(`package.json` 声明 `^8.18.0`) | MIT | `Copyright (c) 2011 Einar Otto Stangvik <einaros@gmail.com>`、`Copyright (c) 2013 Arnout Kazemier and contributors`、`Copyright (c) 2016 Luigi Pinca and contributors` |
|
|
45
|
+
| zod | 4.6.6(精确 pin) | MIT | `Copyright (c) 2025 Colin McDonnell` |
|
|
46
|
+
| `@deepseek-ai/dsh-ssh` | 0.2.2-rc.5(精确 pin) | MIT(DSH 项目) | 见 npm 包内 `LICENSE` |
|
|
47
|
+
| `@deepseek-ai/dsh-fs-ssh` | 0.2.2-rc.5(精确 pin) | MIT(DSH 项目) | 见 npm 包内 `LICENSE` |
|
|
48
|
+
| `@deepseek-ai/schemastery` | 3.19.0(精确 pin) | MIT(DSH 项目) | 见 npm 包内 `LICENSE` |
|
|
49
|
+
|
|
50
|
+
## 4. 由宿主提供的 peer 依赖(不随本包分发)
|
|
51
|
+
|
|
52
|
+
`react`、`react-dom`(MIT,`Copyright (c) Facebook, Inc. and its affiliates.`)与其余 `@deepseek-ai/*`
|
|
53
|
+
(`cordis`、`dsh-*`;DSH 以 MIT 发布)由 DSH 宿主提供,本包只声明 peer、不打包其代码;§3 里的三个
|
|
54
|
+
`@deepseek-ai/*` 是本包的**运行期依赖**(非 peer),由 npm 随包安装、同样不内联。
|
|
55
|
+
|
|
56
|
+
`vendor/` 下的 helper 种子由 DeepSeek Harness 源码(MIT)按 `dsh-v0.2.2-rc.4` tag 用官方脚本构建,并内嵌
|
|
57
|
+
Node.js 运行时(MIT);构建流程与两处偏离见 README「Helper 自编译」。
|
|
58
|
+
|
|
59
|
+
## 5. 许可证正文与获取位置
|
|
60
|
+
|
|
61
|
+
- **随安装提供的包**(第 3、4 节):安装后 `.dsh` 剖面/工程里 `node_modules/<包名>/LICENSE` 即原文;pnpm
|
|
62
|
+
布局下为 `node_modules/.pnpm/<包名>@<版本>/node_modules/<包名>/LICENSE`。
|
|
63
|
+
- **内联且不随安装提供的包**(第 1 节的 ssh2 链):原文在本仓库开发树的同一条 `.pnpm` 路径下,
|
|
64
|
+
另可在上游仓库(ssh2: `mscdex/ssh2`;asn1: `mcavage/node-asn1`;safer-buffer: `ChALkeR/safer-buffer`;
|
|
65
|
+
bcrypt-pbkdf: `joyent/node-bcrypt-pbkdf`;tweetnacl: `dchest/tweetnacl-js`)取得;其正文按许可证要求
|
|
66
|
+
抄录于 5.1–5.3。
|
|
67
|
+
- 内联的浏览器包(第 2 节)全部为 MIT,正文即 5.1 的通用 MIT 文本,各自版权行见上表。
|
|
68
|
+
|
|
69
|
+
### 5.1 MIT(以下包共用此正文;版权行见各表)
|
|
70
|
+
|
|
71
|
+
```text
|
|
72
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy of
|
|
73
|
+
this software and associated documentation files (the "Software"), to deal in
|
|
74
|
+
the Software without restriction, including without limitation the rights to
|
|
75
|
+
use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
|
|
76
|
+
the Software, and to permit persons to whom the Software is furnished to do so,
|
|
77
|
+
subject to the following conditions:
|
|
78
|
+
|
|
79
|
+
The above copyright notice and this permission notice shall be included in all
|
|
80
|
+
copies or substantial portions of the Software.
|
|
81
|
+
|
|
82
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
83
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
|
|
84
|
+
FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
|
|
85
|
+
COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
|
|
86
|
+
IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
|
|
87
|
+
CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
|
88
|
+
```
|
|
89
|
+
|
|
90
|
+
### 5.2 bcrypt-pbkdf(1.0.2,LICENSE 全文)
|
|
91
|
+
|
|
92
|
+
```text
|
|
93
|
+
The Blowfish portions are under the following license:
|
|
94
|
+
|
|
95
|
+
Blowfish block cipher for OpenBSD
|
|
96
|
+
Copyright 1997 Niels Provos <provos@physnet.uni-hamburg.de>
|
|
97
|
+
All rights reserved.
|
|
98
|
+
|
|
99
|
+
Implementation advice by David Mazieres <dm@lcs.mit.edu>.
|
|
100
|
+
|
|
101
|
+
Redistribution and use in source and binary forms, with or without
|
|
102
|
+
modification, are permitted provided that the following conditions
|
|
103
|
+
are met:
|
|
104
|
+
1. Redistributions of source code must retain the above copyright
|
|
105
|
+
notice, this list of conditions and the following disclaimer.
|
|
106
|
+
2. Redistributions in binary form must reproduce the above copyright
|
|
107
|
+
notice, this list of conditions and the following disclaimer in the
|
|
108
|
+
documentation and/or other materials provided with the distribution.
|
|
109
|
+
3. The name of the author may not be used to endorse or promote products
|
|
110
|
+
derived from this software without specific prior written permission.
|
|
111
|
+
|
|
112
|
+
THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
|
|
113
|
+
IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
|
|
114
|
+
OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
|
|
115
|
+
IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
|
|
116
|
+
INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
|
|
117
|
+
NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
|
|
118
|
+
DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
|
|
119
|
+
THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
|
120
|
+
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
|
|
121
|
+
THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|
122
|
+
|
|
123
|
+
|
|
124
|
+
|
|
125
|
+
The bcrypt_pbkdf portions are under the following license:
|
|
126
|
+
|
|
127
|
+
Copyright (c) 2013 Ted Unangst <tedu@openbsd.org>
|
|
128
|
+
|
|
129
|
+
Permission to use, copy, modify, and distribute this software for any
|
|
130
|
+
purpose with or without fee is hereby granted, provided that the above
|
|
131
|
+
copyright notice and this permission notice appear in all copies.
|
|
132
|
+
|
|
133
|
+
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
|
|
134
|
+
WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
|
|
135
|
+
MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
|
|
136
|
+
ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
|
|
137
|
+
WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
|
|
138
|
+
ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
|
|
139
|
+
OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
|
140
|
+
|
|
141
|
+
|
|
142
|
+
|
|
143
|
+
Performance improvements (Javascript-specific):
|
|
144
|
+
|
|
145
|
+
Copyright 2016, Joyent Inc
|
|
146
|
+
Author: Alex Wilson <alex.wilson@joyent.com>
|
|
147
|
+
|
|
148
|
+
Permission to use, copy, modify, and distribute this software for any
|
|
149
|
+
purpose with or without fee is hereby granted, provided that the above
|
|
150
|
+
copyright notice and this permission notice appear in all copies.
|
|
151
|
+
|
|
152
|
+
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
|
|
153
|
+
WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
|
|
154
|
+
MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
|
|
155
|
+
ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
|
|
156
|
+
WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
|
|
157
|
+
ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
|
|
158
|
+
OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
|
159
|
+
```
|
|
160
|
+
|
|
161
|
+
### 5.3 tweetnacl(0.14.5,Unlicense 全文)
|
|
162
|
+
|
|
163
|
+
```text
|
|
164
|
+
This is free and unencumbered software released into the public domain.
|
|
165
|
+
|
|
166
|
+
Anyone is free to copy, modify, publish, use, compile, sell, or
|
|
167
|
+
distribute this software, either in source code form or as a compiled
|
|
168
|
+
binary, for any purpose, commercial or non-commercial, and by any
|
|
169
|
+
means.
|
|
170
|
+
|
|
171
|
+
In jurisdictions that recognize copyright laws, the author or authors
|
|
172
|
+
of this software dedicate any and all copyright interest in the
|
|
173
|
+
software to the public domain. We make this dedication for the benefit
|
|
174
|
+
of the public at large and to the detriment of our heirs and
|
|
175
|
+
successors. We intend this dedication to be an overt act of
|
|
176
|
+
relinquishment in perpetuity of all present and future rights to this
|
|
177
|
+
software under copyright law.
|
|
178
|
+
|
|
179
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
|
180
|
+
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
|
181
|
+
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
|
|
182
|
+
IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR
|
|
183
|
+
OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
|
|
184
|
+
ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
|
|
185
|
+
OTHER DEALINGS IN THE SOFTWARE.
|
|
186
|
+
|
|
187
|
+
For more information, please refer to <http://unlicense.org>
|
|
188
|
+
```
|