dsh-remote-vs 0.25.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 +11 -7
- package/README.md +10 -7
- package/THIRD-PARTY-NOTICES.md +188 -0
- package/lib/client.js +6512 -79961
- package/lib/index.js +1283 -992
- package/lib/p2-router-fs.js +1 -1
- package/lib/types/client/CodeEditor.d.ts +8 -0
- package/lib/types/client/RemoteExplorer.d.ts +53 -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/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 +53 -0
- package/lib/types/client/vsc/FindWidget.d.ts +6 -0
- package/lib/types/client/vsc/change-marks.d.ts +16 -6
- package/lib/types/client/vsc/editor-keymap.d.ts +35 -1
- package/lib/types/client/vsc/kit.d.ts +11 -0
- package/lib/types/client/vsc/save-shortcut.d.ts +21 -0
- package/lib/types/client/vsc/terminal-theme.d.ts +28 -2
- 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/routes.d.ts +2 -0
- package/lib/types/store.d.ts +7 -0
- package/lib/types/terminal.d.ts +8 -0
- 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 +151 -8
- package/src/client/DirectoryFlow.tsx +16 -0
- package/src/client/DoctorPanel.tsx +70 -7
- package/src/client/EditorPane.tsx +63 -14
- package/src/client/HostsView.tsx +12 -3
- package/src/client/RemoteDirectoryPicker.tsx +12 -0
- package/src/client/RemoteExplorer.tsx +929 -40
- package/src/client/RemoteRoot.tsx +147 -22
- package/src/client/SearchView.tsx +8 -0
- package/src/client/TerminalSnippets.tsx +83 -8
- package/src/client/api.ts +106 -13
- 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/i18n.ts +82 -8
- 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 +372 -9
- package/src/client/ui.tsx +4 -0
- package/src/client/vsc/FindWidget.tsx +24 -9
- package/src/client/vsc/breadcrumb.tsx +91 -3
- package/src/client/vsc/change-marks.ts +93 -44
- package/src/client/vsc/editor-keymap.ts +59 -1
- package/src/client/vsc/file-icons.tsx +17 -3
- package/src/client/vsc/kit.tsx +26 -9
- package/src/client/vsc/save-shortcut.ts +47 -1
- package/src/client/vsc/terminal-theme.ts +44 -18
- package/src/client/vsc/vsc.css +411 -153
- 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/routes.ts +212 -43
- package/src/sftp.ts +51 -14
- package/src/store.ts +10 -0
- package/src/terminal.ts +73 -26
- 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
|
@@ -99,22 +99,22 @@ extra configuration is needed.
|
|
|
99
99
|
|
|
100
100
|
| Capability | Notes |
|
|
101
101
|
| --- | --- |
|
|
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) |
|
|
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** |
|
|
103
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) |
|
|
104
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 |
|
|
105
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 |
|
|
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) |
|
|
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 |
|
|
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) |
|
|
108
108
|
| Side-by-side diff | Panes stay **exactly equal** + per-hunk buttons in the middle gutter + a **top horizontal scrollbar** (a very long line can no longer break the symmetry) + pinned line numbers, **rendering only the rows inside the viewport** (a 3000-line file goes from 9000 row containers to ~174, with exactly the same scroll range as a full render); switch between "before / after", and the after side is editable and savable (the save writes the working-tree file back; a diff above 8MiB is read-only, so a truncated prefix can never be written over the real file) |
|
|
109
109
|
| Commit graph | SVG branch/merge graph; selecting a commit opens the **resizable / expandable commit-details pane** below it with three views: **Commit details** (subject, author, time, full hash + copy, parents, refs, message body, checkout), **Contents** (changed files grouped by directory, collapsible and path-filterable; click for the diff, right-click or the row button to open in the editor), **Diff** (only the first ~1500 rows start expanded, later files start folded; both line numbers, `+/−` counts, line wrapping, previous/next-file navigation, and copy of one file's patch or the whole patch). Merge commits are shown against their **first parent** (git lists no files for a merge otherwise) |
|
|
110
110
|
| AI review | A single-file diff OR a **whole commit** can be handed to the conversation with one click — the request is **appended to the composer draft only** (nothing is sent automatically, and you can edit it first): a diff up to 32 KiB is inlined verbatim; a larger one (or one silently truncated at the 2 MB cap) becomes a summary request — file/commit facts + hunk headers + "fetch it yourself with `git show`" (a 2 MB diff is hundreds of thousands of tokens, so inlining it is pointless); an untracked or binary file is passed by path and the model reads it. Entries: the side-by-side diff toolbar and the commit pane's Diff toolbar; the button is disabled with the reason when the current session is not bound to this remote workspace, or the host exposes no conversation input channel |
|
|
111
|
-
| Multi-tab editor | Open/save/reload, dirty marks, several files at once; **saves are atomic** (side file + rename, writing through symlinks and keeping the mode bits); **a save is checked against the remote baseline** — when the file was written by someone else (an agent through the transparent route, a terminal, another editor) since it was opened, the save is refused and offers "overwrite / load remote version / show difference" instead of overwriting silently; image preview, Markdown/HTML 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** |
|
|
112
112
|
| Floating editor | Three entries: "Open in floating editor" in the file-tree / search-hit / source-control context menus, plus **double-clicking the "remote editor" tab** to float the editor as it stands (same tabs, previews, diff, find and change marks — not a second, thinner editor). Drag the title bar to move, drag any of the eight edges/corners to resize, maximize/restore (or double-click the title bar); **minimize to a draggable floating ball** (dirty dot on it, click or press Enter to restore, drag to park it anywhere); `Ctrl+wheel` zooms the editor text. Position, size, font size and the ball's spot survive a page refresh |
|
|
113
113
|
| Syntax highlighting | VS Code **Dark+ / Light+** palettes; covers java/aidl/smali, c/c++, go, rust, js/ts, json, py, yaml, xml, html/css, md, sh, properties/rc/toml, diff …; a **fallback colorer** takes over when no grammar matches, so a file is never left monochrome. Honest caveat: kotlin / gradle / smali are coloured by the Java grammar (no dedicated package), which gets keywords, strings and comments right but does not split their own syntax |
|
|
114
114
|
| Find | In-editor `Ctrl+F` (`Aa` / `ab_` / `.*`, `3/17` count, ↑↓, `F3`/`Shift+F3`, `Esc`); **selected text is carried into the box by `Ctrl+F`**; the widget is pinned to the top-right and does not scroll away; the `n/N` count refreshes on `F3`, clicks and caret moves |
|
|
115
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` |
|
|
116
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 |
|
|
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 |
|
|
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 |
|
|
118
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) |
|
|
119
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 |
|
|
120
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 |
|
|
@@ -233,7 +233,7 @@ dsh_remote_vs/
|
|
|
233
233
|
├── vendor/dsh-remote-helpers/ # helper seeds (shipped, seeded into cache at startup, see below)
|
|
234
234
|
├── docs/ # local-only working docs (only docs/media/ screenshots ship)
|
|
235
235
|
│ ├── MAINTENANCE.md # local-only (.gitignore), not shipped: upgrade impact, checklist, pitfalls, release
|
|
236
|
-
│ ├── VERSION-HISTORY.md # local-only: per-release change log (0.7.1 → 0.
|
|
236
|
+
│ ├── VERSION-HISTORY.md # local-only: per-release change log (0.7.1 → 0.26.0)
|
|
237
237
|
│ └── GATES.md # local-only: local gate inventory and measured assertion counts
|
|
238
238
|
├── locale/ # bilingual plugin metadata
|
|
239
239
|
└── lib/ # build output (**must be committed**; only .map is ignored; restart after link install)
|
|
@@ -441,6 +441,7 @@ Upstream never published helper binaries (all Release assets are empty), so this
|
|
|
441
441
|
## Security model
|
|
442
442
|
|
|
443
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.
|
|
444
445
|
- Passwords / key passphrases are stored in plaintext in `dsh-remote.json` (0600) — same trust model as the existing SSH plugin.
|
|
445
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.
|
|
446
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).
|
|
@@ -512,12 +513,15 @@ tsc, to the bundler and to jsdom — this fixture is the only place they reprodu
|
|
|
512
513
|
> exactly why "57 call sites" and "55 checks run" differ by 2).
|
|
513
514
|
|
|
514
515
|
The live-host regression is still `npx tsc -p tsconfig.scratch.json && node .spike/build/.spike/p2-router.js`.
|
|
515
|
-
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`).
|
|
516
517
|
|
|
517
518
|
## License
|
|
518
519
|
|
|
519
520
|
MIT © 2026 xiray-xia — see [LICENSE](./LICENSE).
|
|
520
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
|
+
|
|
521
525
|
The `vendor/` helper seed is built from DeepSeek Harness sources (MIT) at tag `dsh-v0.2.2-rc.4`
|
|
522
526
|
with the stock build script; see "Self-built helper" above for the exact procedure and the two
|
|
523
527
|
documented deviations (`glibc-ceiling.patch` and `ssh-helper-runtime-deps.patch` in the seed set).
|
package/README.md
CHANGED
|
@@ -81,22 +81,22 @@ Host 转发(终端按 `__DSH_TRANSPORT__.streamBaseUrl` 解析地址),无
|
|
|
81
81
|
|
|
82
82
|
| 能力 | 说明 |
|
|
83
83
|
| --- | --- |
|
|
84
|
-
| 资源管理器 | 懒加载目录树 + 单击目录即展开/折叠 + 隐藏文件开关;**新增悬停 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,松手即落在已展开的目标里;中途取消不会留下自动展开) |
|
|
85
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×,产品只开两条通道,不开四条);小文件不开第二条,省一个通道槽。上传保持单通道(服务端写入是瓶颈,多通道无收益) |
|
|
86
86
|
| 搜索 | 两档:**文件名**(远端 `find`)与**内容**(远端 `grep`)。内容档带范围目录、`Aa`(大小写)/`ab_`(全字)/`.*`(正则)、结果按文件分组、命中高亮,点条目跳到该行;**内容档可中止**(改写或清空查询会终止正在跑的远端 `grep`;老 Host 无流式路由时退化为不可取消的一次性查询),成功但远端给了 stderr 警告时在结果上方提示;文件名档里命中**目录**时在树中定位,而不是当文件打开 |
|
|
87
87
|
| 连接状态与离线只读 | 顶部栏与编辑器信息栏显示当前工作区的 SSH 连接状态(**连接正常 / 连接异常 / 就绪·按需连接**):断线不再静默——已打开的编辑器标签保留缓存内容并切为**只读**(保存被拦截并说明原因),目录树继续显示已缓存目录、后台刷新静默,未缓存目录显示离线提示;连接恢复后自动刷新目录、Git 状态、**未修改的文件标签和只读 diff 标签**(有未保存改动的标签不动并提示)。错误态不会无限重连:每 30 秒最多自动重试 3 次,之后点状态图标手动重试。断线时「撤销这处改动」和 diff 的 hunk 操作同样被拦截;**单次操作的超时(deadline)不当作链路故障**——chip 保持正常,只有该次操作失败并说明原因;断线且该工作区没有缓存时,SCM 面板直接说明无法读取,而不是停在「加载中」。**不做**跨页面刷新的持久化缓存(远端源码不落盘),这是有意的隐私取舍 |
|
|
88
|
-
| 源代码管理 | **仓库目录选择器**(工作区里的 git 在子目录时用:浏览远端目录、一键跳到工作区内发现的仓库、手输相对/绝对路径,并逐目录提示会落在哪个仓库);变更/暂存/未跟踪/忽略分桶,**未跟踪目录行可点击展开**,逐文件与**逐 hunk** 暂存/还原、丢弃(带确认)、提交;分支/远程/stash
|
|
89
|
-
| 会话改动审阅 | 输入框上方的**可收纳**面板,按**会话**列出改了什么(一行一个文件、文件类型图标、右侧 `+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`)。详见下文「会话改动审阅」 |
|
|
90
90
|
| 并排 Diff | 左右**严格等分** + 中间 gutter 逐 hunk 按钮 + **顶部横向滚动条**(一行很长也不会破坏对称)+ 行号钉在左侧,**只渲染视口内的行**(3000 行文件从 9000 个行容器降到约 174 个,滚动范围与整篇渲染完全一致);可切「变更前 / 变更后」,变更后可编辑并保存(保存写回工作树文件;超过 8MiB 的差异只读,避免把截断内容写回去) |
|
|
91
91
|
| 提交图 | SVG 分支/合并图;点选提交后,下方**可调高度 / 可全屏**的提交详情面板给出三个视图:**提交详情**(标题、作者、时间、完整哈希+复制、父提交、ref、正文、检出)、**内容**(改动文件按目录分组、可折叠、可过滤,单击看差异、右键或行尾按钮在编辑器中打开)、**差异**(默认只展开前约 1500 行、其余文件折叠;双行号、`+/−` 计数、自动换行、上一/下一个文件、复制文件补丁或整个补丁)。合并提交按**首父**展示(git 对 merge 默认不给文件列表) |
|
|
92
92
|
| AI 审查 | 单文件 diff 与**整个提交**都能一键把审查请求追加到对话草稿(**只预填,不自动发送**,发送前可自行修改):≤32 KiB 内嵌完整 diff;更大或被 2 MB 静默截断时改为「文件/提交信息 + 变更块头 + 自行 `git show`」的摘要式请求(2 MB diff 约几十万 token,硬塞没有意义);未跟踪/二进制文件只给路径让 AI 自行读取。入口:并排 diff 工具栏、提交详情「差异」工具栏;当前会话不在该远端工作区、或宿主没有可用的对话输入通道时按钮禁用并写明原因 |
|
|
93
|
-
| 多标签编辑器 | 打开/保存/重载、脏标记、多文件标签并存;**保存是原子的**(侧文件 + 重命名,写穿符号链接并保留权限位);**保存前校验远端基线**:文件在打开之后被别人(Agent 的透明路由、终端、另一个编辑器)改过时保存被拒绝,并给出「覆盖 / 载入远端版本 / 查看差异」,不再静默覆盖;图片预览、Markdown/HTML
|
|
93
|
+
| 多标签编辑器 | 打开/保存/重载、脏标记、多文件标签并存;**保存是原子的**(侧文件 + 重命名,写穿符号链接并保留权限位);**保存前校验远端基线**:文件在打开之后被别人(Agent 的透明路由、终端、另一个编辑器)改过时保存被拒绝,并给出「覆盖 / 载入远端版本 / 查看差异」,不再静默覆盖;图片预览、Markdown/HTML 预览(源码/预览切换);**Ctrl+G 转到行**、**Ctrl+D 选中下一个相同文本**;关闭标签、重载、切工作区遇到未保存改动都会**先确认**(切工作区会清空全部标签,所以先问);`Ctrl+S` 全局生效,焦点不在编辑器里也能保存;**刷新页面后自动恢复上次打开的文件标签**(按工作区记,最多 12 个;只存路径不存内容,打不开的会跳过并提示数量;光标与滚动位置不恢复) |
|
|
94
94
|
| 悬浮编辑器 | 三个入口:文件树 / 搜索结果 / 源代码管理右键「在悬浮编辑器中打开」,以及**双击会话视图的「远程编辑器」标签**把当前编辑器整体浮出(同一套标签、预览、Diff、查找、改动标记,不是另写一个编辑器)。窗口可拖标题栏移动、拖八个边角缩放、最大化/还原、双击标题栏切换最大化;**最小化成一个可拖动的悬浮球**(球上有未保存脏点,点一下或按 Enter 恢复,拖动可换位置);`Ctrl+滚轮` 缩放编辑器字号;位置、大小、字号和球的位置跨刷新记住 |
|
|
95
95
|
| 语法高亮 | VS Code **Dark+ / Light+** 配色;覆盖 java/aidl/smali、c/c++、go、rust、js/ts、json、py、yaml、xml、html/css、md、sh、properties/rc/toml、diff 等;**兜底着色器**在语法包没命中时自动接管,不会出现整篇无色。诚实说明:kotlin / gradle / smali 用 Java 语法着色(没有专用语法包),效果是关键字/字符串/注释正确、专有语法不细分 |
|
|
96
96
|
| 查找 | 编辑器内 `Ctrl+F`(`Aa`/`ab_`/`.*`、`3/17` 计数、↑↓、`F3`/`Shift+F3`、`Esc`);**选中文本按 `Ctrl+F` 直接填入**;查找框钉在右上角,滚动不带走;`n/N` 计数随 `F3`、点击和光标移动刷新 |
|
|
97
97
|
| 快速打开 | `Ctrl+P`(macOS `⌘+P`)按文件名直达,不用一层层展开目录:远端文件索引一次拉取(有 `rg` 用 `rg --files`,没有则回退 `find`;**在远端**就按条目数与字节数封顶,被截断会明确提示"索引已截断,仅可搜索前 N 个文件"而不是假装完整),本地子序列模糊匹配(连续匹配、文件名段、词边界加权,同分按路径稳定排序),首屏是最近打开。索引**只在内存**、只存路径不存内容、刷新即失效;保存/上传/删除/改名/新建之后下次打开自动重建(终端或 Agent 直接写远端不在失效范围内,刷新页面即可)。快捷键只在远端工作台可见时接管,本地会话保留浏览器自己的 `Ctrl+P` |
|
|
98
98
|
| 跳转 | 从搜索结果点进文件 → 跳到该行 + 垂直居中 + **落地行高亮**(约 2.6 秒后淡出);同文件反复跳都生效 |
|
|
99
|
-
| 多终端 | 标签式多终端(`+` 新建、`✕`/中键关闭带确认)、可跨主机;刷新页面按 session id
|
|
99
|
+
| 多终端 | 标签式多终端(`+` 新建、`✕`/中键关闭带确认)、可跨主机;刷新页面按 session id 自动重连回原会话,**重连时重放最近输出**(切换会话/重挂侧栏不再出现空白终端),**socket 全断开后会话保留 10 分钟**(够刷新、够切浏览器标签页接回),超时才关闭远端 shell;**socket 断开(而不是 shell 退出)时会话保留、可一键接回**(同一 session id 重连,Host 侧仍按上面 10 分钟 TTL 回收),只有真正退出才清会话 |
|
|
100
100
|
| 工作区 | 绑定列表 + 路由档位下拉 + 新建工作区双模向导(本地 / 远端);**解绑前确认**(会话与历史仍可读,新的远端调用会被拒绝) |
|
|
101
101
|
| 视图偏好 | 设置 → 远程主机页底部的两项:**新建的远程会话自动打开远程工作区**(默认关;只认远端工作区的会话,本机会话永不触发;每次页面加载对同一会话只判断一次,手动关掉的面板不会被重新打开)与**远程工作区占比**(默认 45%,20%–70%):插件打开右栏「远程工作台」页时,右侧面板按这个比例占窗口宽度;面板已打开时改占比立即生效。两项都存 Host 侧(`$DSH_HOME/dsh-remote-view.json`),同一 profile 的各窗口一致 |
|
|
102
102
|
| 端口转发 | 侧边栏「端口」页:列出远端监听端口(`ss`,没有则 `netstat`),对任一端口**一键转发到本地**、复制本地 URL、在浏览器打开;也支持手动「远端地址:端口 → 本地端口(可自动分配)」规则。**本地只监听 `127.0.0.1`**(`ssh -L` 语义,不暴露到局域网);每条转发有自己的通道预算,不占池里的 6 个执行/SFTP 通道;SSH 掉线或闲置回收后,下一条本地连接自动重拨而不影响监听;规则存浏览器(刷新后恢复),可逐条停止;关闭插件、删除主机、卸载插件都会释放本地端口。远端既没有 `ss` 也没有 `netstat`、或探测超时/中断时,明确显示「无法枚举」而不是空列表 |
|
|
@@ -215,7 +215,7 @@ dsh_remote_vs/
|
|
|
215
215
|
├── vendor/dsh-remote-helpers/ # helper 种子(随包发布,启动铺缓存,见下)
|
|
216
216
|
├── docs/ # 本地工作文档(不推送 GitHub;只有 docs/media/ 的截图随仓库公开)
|
|
217
217
|
│ ├── MAINTENANCE.md # 本地私有(.gitignore,不入库):升级影响面/检查清单/踩坑/发布流程
|
|
218
|
-
│ ├── VERSION-HISTORY.md # 本地私有:逐版本变更纪要(0.7.1 → 0.
|
|
218
|
+
│ ├── VERSION-HISTORY.md # 本地私有:逐版本变更纪要(0.7.1 → 0.26.0)
|
|
219
219
|
│ └── GATES.md # 本地私有:本地门禁清单与实跑条数
|
|
220
220
|
├── locale/ # 插件元信息双语
|
|
221
221
|
└── lib/ # 构建产物(**必须入库**,只有 .map 忽略;link 安装后重启即生效)
|
|
@@ -386,6 +386,7 @@ helper RPC(fs)/ ssh2(进程),本地一切不变;两者同 Host、共
|
|
|
386
386
|
## 安全模型
|
|
387
387
|
|
|
388
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 发起,不受影响。
|
|
389
390
|
- 密码 / 私钥口令以明文保存在 `dsh-remote.json`(0600),与现有 SSH 插件同一信任模型。
|
|
390
391
|
- 推送物逐包验 sha256(tarball 进、binary 出,双重校验);helper 安装目录与工作区分开;sidecar 的 `version`、平台与 tarball 路径都走白名单校验(不内插未校验字符串到远端 shell 行),安装失败会保留上一版。
|
|
391
392
|
- 主机配置写入走 fsync + 变更戳复核(读-改-写窗口内被别的进程改过会重放,而不是静默覆盖)。
|
|
@@ -449,12 +450,14 @@ node .spike/letter-check.mjs # 状态字母:未跟踪 ? 与冲突 U 不再
|
|
|
449
450
|
> 失败时才触发,所以「调用点 57」与「跑出来 55」本来就该差 2)。
|
|
450
451
|
|
|
451
452
|
真机回归仍是 `npx tsc -p tsconfig.scratch.json && node .spike/build/.spike/p2-router.js`。
|
|
452
|
-
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`)。
|
|
453
454
|
|
|
454
455
|
## 开源许可
|
|
455
456
|
|
|
456
457
|
MIT © 2026 xiray-xia —— 见 [LICENSE](./LICENSE)。
|
|
457
458
|
|
|
459
|
+
发行包内联/依赖的第三方组件与许可证见 [THIRD-PARTY-NOTICES.md](./THIRD-PARTY-NOTICES.md)。
|
|
460
|
+
|
|
458
461
|
`vendor/` 里的 helper 种子由 DeepSeek Harness 源码(MIT)按 `dsh-v0.2.2-rc.4`
|
|
459
462
|
tag 以官方原脚本构建,具体流程与两处有记录的偏离见上文"Helper 自编译"节
|
|
460
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
|
+
```
|